Skip to content

Commit 5c63b69

Browse files
TST; add test for compatibility with numpy datetime64 (pandas-dev#41617)
1 parent adcf608 commit 5c63b69

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

pandas/tests/tseries/frequencies/test_freq_code.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,18 @@ def test_cat(args):
8080
with pytest.raises(ValueError, match=msg):
8181
to_offset(str(args[0]) + args[1])
8282

83+
8384
@pytest.mark.parametrize(
84-
'freqstr,expected',
85+
"freqstr,expected",
8586
[
86-
('1H','2021-01-01T09:00:00'),
87-
('1D','2021-01-01T08:00:00'),
88-
('1W','2021-01-03T08:00:00'),
89-
('1M','2021-01-31T08:00:00'),
90-
('1Y','2021-12-31T08:00:00')
87+
("1H","2021-01-01T09:00:00"),
88+
("1D","2021-01-01T08:00:00"),
89+
("1W","2021-01-03T08:00:00"),
90+
("1M","2021-01-31T08:00:00"),
91+
("1Y","2021-12-31T08:00:00")
9192
]
9293
)
93-
def test_compatibility(freqstr,expected):
94-
ts_np = datetime64('2021-01-01T08:00:00.00')
94+
def test_compatibility(freqstr,expected):
95+
ts_np = datetime64("2021-01-01T08:00:00.00")
9596
do = to_offset(freqstr)
96-
97-
assert ts_np + do == datetime64(expected)
98-
97+
assert ts_np + do == datetime64(expected)

0 commit comments

Comments
 (0)