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 0135b79 commit ce83026Copy full SHA for ce83026
pandas/tests/arrays/test_array.py
@@ -309,6 +309,14 @@ def test_scalar_raises():
309
pd.array(1)
310
311
312
+def test_bounds_check():
313
+ # GH21796
314
+ with pytest.raises(
315
+ TypeError, match=r"cannot safely cast non-equivalent int(32|64) to uint16"
316
+ ):
317
+ pd.array([-1, 2, 3], dtype="UInt16")
318
+
319
320
# ---------------------------------------------------------------------------
321
# A couple dummy classes to ensure that Series and Indexes are unboxed before
322
# getting to the EA classes.
0 commit comments