We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f0e2e commit 0fb8210Copy full SHA for 0fb8210
pandas/tests/indexes/datetimes/test_constructors.py
@@ -31,6 +31,7 @@
31
)
32
import pandas._testing as tm
33
from pandas.core.arrays import period_array
34
+from pandas.errors import TimezoneDtypeMismatchError
35
36
37
class TestDatetimeIndex:
@@ -709,7 +710,7 @@ def test_constructor_dtype_tz_mismatch_raises(self):
709
710
"cannot supply both a tz and a timezone-naive dtype "
711
r"\(i\.e\. datetime64\[ns\]\)"
712
- with pytest.raises(ValueError, match=msg):
713
+ with pytest.raises(TimezoneDtypeMismatchError, match=msg):
714
DatetimeIndex(idx, dtype="datetime64[ns]")
715
716
# this is effectively trying to convert tz's
0 commit comments