Skip to content

Commit

Permalink
use .get to avoid eager failure
Browse files Browse the repository at this point in the history
  • Loading branch information
robfitzgerald committed Dec 10, 2024
1 parent 6d7fdee commit 329ff13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/test_downtown_denver_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def test_downtown_denver_example(self) -> None:
"model_name": "2016_TOYOTA_Camry_4cyl_2WD",
"weights": {"distance": 1, "time": 1, "energy_liquid": 1},
}

result = app.run(query)

self.assertTrue(
"error" not in result,
msg=f"error in downtown denver test: {result['error']}",
msg=f"error in downtown denver test: {result.get('error')}",
)

0 comments on commit 329ff13

Please sign in to comment.