Skip to content

Commit

Permalink
Adjust station_reference_pattern_sorted and station_reference_pattern…
Browse files Browse the repository at this point in the history
…_sorted_prefixed to make radar tests work
  • Loading branch information
gutzbenj committed Nov 8, 2023
1 parent 817870c commit d432f37
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/provider/dwd/radar/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ def prefixed_radar_locations(radar_locations):

@pytest.fixture(scope="function")
def station_reference_pattern_sorted(radar_locations):
last = radar_locations.pop(-1)
return "".join([f"({location},)?" for location in radar_locations]) + f"({last})?"
return "".join([f"({location})?(,)?" for location in radar_locations])


@pytest.fixture(scope="function")
def station_reference_pattern_sorted_prefixed(prefixed_radar_locations):
last = prefixed_radar_locations.pop(-1)
return "".join([f"({location},)?" for location in prefixed_radar_locations]) + f"({last})?"
return "".join([f"({location})?(,)?" for location in prefixed_radar_locations])

0 comments on commit d432f37

Please sign in to comment.