Skip to content

Commit

Permalink
test: invalid transport_performance() backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-moss committed Nov 16, 2023
1 parent ffeb3d8 commit 16a173e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,30 @@ def test_transport_performance_type_defences(
default_args[arg_name] = arg_value
with expected:
transport_performance(**default_args)

def test_transport_performance_invalid_backend(
self, centroid_gdf_fixture, pop_gdf_fixture, tt_fixture
) -> None:
"""Test transport performance with an invalid backend.
Parameters
----------
centroid_gdf_fixture
Mock centroid test fixture
pop_gdf_fixture
Mock population test fixture
tt_fixture
Mock travel time test fixture
"""
# call transport_performance() using an invalid backend
with pytest.raises(
ValueError,
match="Got `backend`=test. Expected one of:",
):
transport_performance(
tt_fixture,
centroid_gdf_fixture,
pop_gdf_fixture,
backend="test",
)

0 comments on commit 16a173e

Please sign in to comment.