Skip to content

Commit 4d80749

Browse files
committed
Added test for pyarrow logical op bug
1 parent ee0902a commit 4d80749

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/arrays/string_/test_string.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,3 +740,12 @@ def test_tolist(dtype):
740740
result = arr.tolist()
741741
expected = vals
742742
tm.assert_equal(result, expected)
743+
744+
@pytest.mark.parametrize("dtype", ["string[python]", "string[pyarrow]"])
745+
def test_logical_operators_pyarrow_string(dtype):
746+
with pd.option_context("future.infer_string", True):
747+
ser1 = pd.Series([False, False])
748+
ser2 = pd.Series(["", "b"], dtype=dtype)
749+
result = ser1 | ser2
750+
expected = pd.Series([False, True], dtype=bool)
751+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)