Skip to content

Commit b5589ac

Browse files
author
MomIsBestFriend
committed
TST: Added regression test
1 parent ba08390 commit b5589ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pandas/tests/frame/test_timeseries.py

+15
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@
2121
import pandas.tseries.offsets as offsets
2222

2323

24+
def test_no_idea_how_to_name_this_or_where_to_place_this():
25+
# https://github.com/pandas-dev/pandas/issues/10329
26+
df = pd.DataFrame(
27+
{
28+
"date": pd.date_range("2012-01-01", periods=3),
29+
"time": [time(i, i, i) for i in range(3)],
30+
}
31+
)
32+
33+
msg = "unsupported operand type\(s\) for -: 'Timestamp' and 'datetime.time'"
34+
35+
with pytest.raises(TypeError, match=msg):
36+
df["date"] - df["time"]
37+
38+
2439
@pytest.fixture(params=product([True, False], [True, False]))
2540
def close_open_fixture(request):
2641
return request.param

0 commit comments

Comments
 (0)