Skip to content

Commit

Permalink
Test made to accept 'us' or 'ns' precision. Fixes #185
Browse files Browse the repository at this point in the history
  • Loading branch information
orion-junkins committed Feb 14, 2024
1 parent f5b9c6b commit 8507d6f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_fetch_historical(weather_provider):
weather_datums = weather_provider.fetch_historical()
assert len(weather_datums) == len(weather_provider.coordinates)
for weather_datum in weather_datums:
assert weather_datum.hourly_parameters.index.dtype == "datetime64[ns, UTC]"
assert (weather_datum.hourly_parameters.index.dtype == "datetime64[ns, UTC]" or weather_datum.hourly_parameters.index.dtype == "datetime64[us, UTC]")
assert expected_columns == sorted(list(weather_datum.hourly_parameters.columns))


Expand Down Expand Up @@ -113,7 +113,7 @@ def test_fetch_current(weather_provider):
weather_datums = weather_provider.fetch_current()
assert len(weather_datums) == len(weather_provider.coordinates)
for weather_datum in weather_datums:
assert weather_datum.hourly_parameters.index.dtype == "datetime64[ns, UTC]"
assert (weather_datum.hourly_parameters.index.dtype == "datetime64[ns, UTC]" or weather_datum.hourly_parameters.index.dtype == "datetime64[us, UTC]")
assert expected_columns == sorted(list(weather_datum.hourly_parameters.columns))


Expand Down

0 comments on commit 8507d6f

Please sign in to comment.