Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arnasbr committed Oct 23, 2024
1 parent b4a93d0 commit facaab1
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions tests/time_map_fast_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,60 @@ async def test_many_to_one_geojson(sdk: TravelTimeSdk):
)

assert len(results) == 2


@pytest.mark.asyncio
async def test_one_to_many_wkt(sdk: TravelTimeSdk):
response = await sdk.time_map_fast_wkt_async(
coordinates=[
Coordinates(lat=51.507609, lng=-0.128315),
Coordinates(lat=51.517609, lng=-0.138315),
],
travel_time=900,
transportation=Transportation(type="public_transport"),
)

assert len(response.results) == 2


@pytest.mark.asyncio
async def test_many_to_one_wkt(sdk: TravelTimeSdk):
response = await sdk.time_map_fast_wkt_async(
coordinates=[
Coordinates(lat=51.507609, lng=-0.128315),
Coordinates(lat=51.517609, lng=-0.138315),
],
travel_time=900,
transportation=Transportation(type="public_transport"),
one_to_many=False,
)

assert len(response.results) == 2

@pytest.mark.asyncio
async def test_one_to_many_wkt_no_holes(sdk: TravelTimeSdk):
response = await sdk.time_map_fast_wkt_no_holes_async(
coordinates=[
Coordinates(lat=51.507609, lng=-0.128315),
Coordinates(lat=51.517609, lng=-0.138315),
],
travel_time=900,
transportation=Transportation(type="public_transport"),
)

assert len(response.results) == 2


@pytest.mark.asyncio
async def test_many_to_one_wkt_no_holes(sdk: TravelTimeSdk):
response = await sdk.time_map_fast_wkt_no_holes_async(
coordinates=[
Coordinates(lat=51.507609, lng=-0.128315),
Coordinates(lat=51.517609, lng=-0.138315),
],
travel_time=900,
transportation=Transportation(type="public_transport"),
one_to_many=False,
)

assert len(response.results) == 2

0 comments on commit facaab1

Please sign in to comment.