Skip to content

Commit 4659a8a

Browse files
committed
Update tests
1 parent 817e5b8 commit 4659a8a

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

pandas/tests/arrays/floating/test_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_ufuncs_single(ufunc):
2424

2525
@pytest.mark.parametrize("ufunc", [np.log, np.exp, np.sin, np.cos, np.sqrt])
2626
def test_ufuncs_single_float(ufunc):
27-
a = pd.array([1.0, 0.2, 3.0, np.nan], dtype="Float64")
27+
a = pd.array([1.0, 0.2, 3.0, pd.NA], dtype="Float64")
2828
with np.errstate(invalid="ignore"):
2929
result = ufunc(a)
3030
expected = pd.array(ufunc(a.astype(float)), dtype="Float64")
@@ -40,7 +40,7 @@ def test_ufuncs_single_float(ufunc):
4040
@pytest.mark.parametrize("ufunc", [np.add, np.subtract])
4141
def test_ufuncs_binary_float(ufunc):
4242
# two FloatingArrays
43-
a = pd.array([1, 0.2, -3, np.nan], dtype="Float64")
43+
a = pd.array([1, 0.2, -3, pd.NA], dtype="Float64")
4444
result = ufunc(a, a)
4545
expected = pd.array(ufunc(a.astype(float), a.astype(float)), dtype="Float64")
4646
tm.assert_extension_array_equal(result, expected)

pandas/tests/frame/methods/test_get_numeric_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def test_get_numeric_data_extension_dtype(self):
9393
# GH#22290
9494
df = DataFrame(
9595
{
96-
"A": pd.array([-10, np.nan, 0, 10, 20, 30], dtype="Int64"),
96+
"A": pd.array([-10, pd.NA, 0, 10, 20, 30], dtype="Int64"),
9797
"B": Categorical(list("abcabc")),
98-
"C": pd.array([0, 1, 2, 3, np.nan, 5], dtype="UInt8"),
98+
"C": pd.array([0, 1, 2, 3, pd.NA, 5], dtype="UInt8"),
9999
"D": IntervalArray.from_breaks(range(7)),
100100
}
101101
)

pandas/tests/reductions/test_reductions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def test_ops_consistency_on_empty_nullable(self, method, dtype):
695695
assert result is pd.NA
696696

697697
# ALL-NA series
698-
nser = Series([np.nan], dtype=dtype)
698+
nser = Series([pd.NA], dtype=dtype)
699699
result = getattr(nser, method)()
700700
assert result is pd.NA
701701

pandas/tests/series/methods/test_case_when.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
from pandas import (
5+
NA,
56
DataFrame,
67
Series,
78
array as pd_array,
@@ -99,7 +100,7 @@ def test_case_when_multiple_conditions_replacement_extension_dtype(df):
99100
(df["a"].gt(1) & df["b"].eq(5), pd_array([1, 2, 3], dtype="Int64")),
100101
],
101102
)
102-
expected = Series([1, 2, np.nan], dtype="Float64")
103+
expected = Series([1, 2, NA], dtype="Float64")
103104
tm.assert_series_equal(result, expected)
104105

105106

0 commit comments

Comments
 (0)