Skip to content

Commit 52b7c21

Browse files
committed
TST: added NA to the astype via loc test (pandas-dev#31861)
1 parent a63365b commit 52b7c21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/frame/methods/test_astype.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55

66
from pandas import (
7+
NA,
78
Categorical,
89
CategoricalDtype,
910
DataFrame,
@@ -137,7 +138,7 @@ def test_astype_cast_nan_inf_int(self, val, dtype):
137138
df.astype(dtype)
138139

139140
@pytest.mark.parametrize("dtype", ["Int64", "Int32", "Int16"])
140-
@pytest.mark.parametrize("val", [np.nan])
141+
@pytest.mark.parametrize("val", [np.nan, NA])
141142
def test_astype_cast_via_loc_nan_int(self, val, dtype):
142143
# see GH#31861
143144
expected = DataFrame({"a": ["foo"], "b": integer_array([val], dtype=dtype)})

0 commit comments

Comments
 (0)