Skip to content

Commit 0a85704

Browse files
committed
TST: test fillna args
1 parent e6a3f40 commit 0a85704

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/arrays/string_/test_string.py

+10
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,16 @@ def test_reduce_missing(skipna, dtype):
422422
assert pd.isna(result)
423423

424424

425+
def test_fillna_args():
426+
arr = pd.array(["a", pd.NA], dtype="string")
427+
arr.fillna(value="b")
428+
429+
arr = pd.array(["a", "b"], dtype="string")
430+
msg = r"1 is not a valid fill value; must be a string"
431+
with pytest.raises(TypeError, match=msg):
432+
arr.fillna(value=1)
433+
434+
425435
@td.skip_if_no("pyarrow", min_version="0.15.0")
426436
def test_arrow_array(dtype):
427437
# protocol added in 0.15.0

0 commit comments

Comments
 (0)