Skip to content

Commit e1577d4

Browse files
https://github.com/pandas-dev/pandas/pull/41018#discussion_r642567911
1 parent b117ab5 commit e1577d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/tests/arrays/string_/test_string.py

+2
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ def test_astype_int(dtype):
333333
expected = np.array([1, 2, 3], dtype="int64")
334334
tm.assert_numpy_array_equal(result, expected)
335335

336+
337+
def test_astype_int_with_nulls_raises(dtype):
336338
arr = pd.array(["1", pd.NA, "3"], dtype=dtype)
337339
msg = re.escape("int() argument must be a string, a bytes-like object or a number")
338340
with pytest.raises(TypeError, match=msg):

0 commit comments

Comments
 (0)