Skip to content

Commit

Permalink
Replace ns with seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
evanjt committed Aug 31, 2023
1 parent 8827b5e commit 106d18e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpm_api/tests/io/test_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ def test_check_time() -> None:
assert res == datetime.datetime(2014, 12, 31)

# Test a object of datetime64[ns] casts to datetime64[ms]
res = checks.check_time(np.datetime64("2014-12-31T12:30:30.934549845", "ns"))
res = checks.check_time(np.datetime64("2014-12-31T12:30:30.934549845", "s"))
assert isinstance(res, datetime.datetime)
assert res == datetime.datetime(2014, 12, 31, 12, 30, 30, 934549)
assert res == datetime.datetime(2014, 12, 31, 12, 30, 30)

# Test a datetime.date
res = checks.check_time(datetime.date(2014, 12, 31))
Expand Down

0 comments on commit 106d18e

Please sign in to comment.