Skip to content

Commit

Permalink
test_automark: describe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aevri committed Jan 28, 2024
1 parent ff0bb85 commit 978e8af
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/rotomap/test_automark.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
@pytest.mark.parametrize("only_merge", [True, False])
@pytest.mark.parametrize("error_distance", [0, 1, 2, 3, 4, 5])
def test_merge_in_radiuses_happy(only_merge, error_distance):
"""Test merge_in_radiuses() with happy path.
For simplicity, there are no radius sources that are not matched to a target.
Each target is matched to a radius source, and the radius value is merged.
"""
radii_sources = [x for x in RADII_SOURCES if x["uuid"] != "7"]
result = automark.merge_in_radiuses(TARGETS, radii_sources, error_distance, only_merge)

Expand All @@ -36,6 +43,13 @@ def test_merge_in_radiuses_happy(only_merge, error_distance):
@pytest.mark.parametrize("only_merge", [True, False])
@pytest.mark.parametrize("error_distance", [0, 1, 2, 3, 4, 5])
def test_merge_in_radiuses_happy_merge_extra(only_merge, error_distance):
"""Test merge_in_radiuses() with happy path and extra radius sources.
There is one radius source that is not matched to a target.
It is either included or not included in the result, depending on only_merge.
"""
result = automark.merge_in_radiuses(TARGETS, RADII_SOURCES, error_distance, only_merge)

if only_merge:
Expand Down

0 comments on commit 978e8af

Please sign in to comment.