Skip to content

Commit 3983b79

Browse files
committed
test a longer time interval; put expected vals after input
1 parent f10c9ab commit 3983b79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cf_units/tests/integration/test__Unit_date2num.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"calendar_const, calendar_str", zip(CALENDAR_CONSTANTS, CALENDAR_STRINGS)
2424
)
2525
def test_fractional_second(calendar_const, calendar_str):
26-
nums = [0.25, 0.5, 0.75, 1.5, 2.5, 3.5, 4.5]
2726
unit = cf_units.Unit("seconds since 1970-01-01", calendar_const)
2827
dates = [
2928
cftime.datetime(1970, 1, 1, 0, 0, 0, 250000, calendar=calendar_str),
@@ -33,7 +32,9 @@ def test_fractional_second(calendar_const, calendar_str):
3332
cftime.datetime(1970, 1, 1, 0, 0, 2, 500000, calendar=calendar_str),
3433
cftime.datetime(1970, 1, 1, 0, 0, 3, 500000, calendar=calendar_str),
3534
cftime.datetime(1970, 1, 1, 0, 0, 4, 500000, calendar=calendar_str),
35+
cftime.datetime(1970, 1, 3, 0, 0, 4, 500000, calendar=calendar_str),
3636
]
37+
nums = [0.25, 0.5, 0.75, 1.5, 2.5, 3.5, 4.5, 172804.5]
3738

3839
for num, date in zip(nums, dates):
3940
res = unit.date2num(date)

0 commit comments

Comments
 (0)