Skip to content

Commit ff20a1d

Browse files
committed
Try from pd.Timedelta
1 parent 7c050fd commit ff20a1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/test_debug.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from datetime import timedelta
2-
31
from pandas._libs.tslibs.timedeltas import debug_divmod_bug
42

3+
import pandas as pd
4+
55

66
def non_buggy_divmod(delta):
77
conv = 1000 * 1
@@ -15,7 +15,7 @@ def non_buggy_divmod(delta):
1515

1616

1717
def test_debug_divmod_bug():
18-
td = timedelta(minutes=-7)
18+
td = pd.Timedelta(minutes=-7).to_pytimedelta()
1919
result = debug_divmod_bug(td)
2020
expected = non_buggy_divmod(td)
2121
assert result == expected

0 commit comments

Comments
 (0)