Skip to content

Commit 637bdc3

Browse files
Backport PR #36706: CI: npdev new exception message (#36751)
Co-authored-by: jbrockmendel <[email protected]>
1 parent e99b467 commit 637bdc3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

pandas/tests/arithmetic/common.py

+7
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ def assert_invalid_comparison(left, right, box):
7676
"Cannot compare type",
7777
"not supported between",
7878
"invalid type promotion",
79+
(
80+
# GH#36706 npdev 1.20.0 2020-09-28
81+
r"The DTypes <class 'numpy.dtype\[datetime64\]'> and "
82+
r"<class 'numpy.dtype\[int64\]'> do not have a common DType. "
83+
"For example they cannot be stored in a single array unless the "
84+
"dtype is `object`."
85+
),
7986
]
8087
)
8188
with pytest.raises(TypeError, match=msg):

pandas/tests/frame/test_arithmetic.py

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ def check(df, df2):
5353
msgs = [
5454
r"Invalid comparison between dtype=datetime64\[ns\] and ndarray",
5555
"invalid type promotion",
56+
(
57+
# npdev 1.20.0
58+
r"The DTypes <class 'numpy.dtype\[.*\]'> and "
59+
r"<class 'numpy.dtype\[.*\]'> do not have a common DType."
60+
),
5661
]
5762
msg = "|".join(msgs)
5863
with pytest.raises(TypeError, match=msg):

0 commit comments

Comments
 (0)