hivesolutions / appier

Joyful Python Web App development
http://appier.hive.pt
Apache License 2.0
127 stars 22 forks source link

fix: Dijkstra's implementation for no path found #53

Closed joao-conde closed 2 years ago

joao-conde commented 2 years ago

Previous implementation threw a KeyError.

This PR adds a unit test covering the no path case and changes it to return no path and infinity for the cost ([], INFINITY).

It also places INFINITY in a common place (defines.py) to be used both by tests and graph module code.

joao-conde commented 2 years ago

@joamag Manual tagging

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.04%) to 64.378% when pulling 1df19139b37ee7c30af2914dbfde5f148e7a60e4 on joao-conde:master into af738f5e888c8d6c1aacdfbf359fbd6d1dda60f5 on hivesolutions:master.