Skip to content

Commit 0fb8210

Browse files
committed
updated test
1 parent 92f0e2e commit 0fb8210

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/indexes/datetimes/test_constructors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
)
3232
import pandas._testing as tm
3333
from pandas.core.arrays import period_array
34+
from pandas.errors import TimezoneDtypeMismatchError
3435

3536

3637
class TestDatetimeIndex:
@@ -709,7 +710,7 @@ def test_constructor_dtype_tz_mismatch_raises(self):
709710
"cannot supply both a tz and a timezone-naive dtype "
710711
r"\(i\.e\. datetime64\[ns\]\)"
711712
)
712-
with pytest.raises(ValueError, match=msg):
713+
with pytest.raises(TimezoneDtypeMismatchError, match=msg):
713714
DatetimeIndex(idx, dtype="datetime64[ns]")
714715

715716
# this is effectively trying to convert tz's

0 commit comments

Comments
 (0)