@@ -741,11 +741,29 @@ def test_tolist(dtype):
741741 expected = vals
742742 tm .assert_equal (result , expected )
743743
744- @pytest .mark .parametrize ("dtype" , ["string[python]" , "string[ pyarrow]" ])
745- def test_logical_operators_pyarrow_string (dtype ):
744+ @pytest .mark .parametrize ("dtype" , ["string[pyarrow]" ])
745+ def test_or_pyarrow_string (dtype ):
746746 with pd .option_context ("future.infer_string" , True ):
747747 ser1 = pd .Series ([False , False ])
748748 ser2 = pd .Series (["" , "b" ], dtype = dtype )
749749 result = ser1 | ser2
750750 expected = pd .Series ([False , True ], dtype = bool )
751+ tm .assert_series_equal (result , expected )
752+
753+ @pytest .mark .parametrize ("dtype" , ["string[pyarrow]" ])
754+ def test_and_pyarrow_string (dtype ):
755+ with pd .option_context ("future.infer_string" , True ):
756+ ser1 = pd .Series ([False , False ])
757+ ser2 = pd .Series (["" , "b" ], dtype = dtype )
758+ result = ser1 & ser2
759+ expected = pd .Series ([False , False ], dtype = bool )
760+ tm .assert_series_equal (result , expected )
761+
762+ @pytest .mark .parametrize ("dtype" , ["string[pyarrow]" ])
763+ def test_xor_pyarrow_string (dtype ):
764+ with pd .option_context ("future.infer_string" , True ):
765+ ser1 = pd .Series ([False , False ])
766+ ser2 = pd .Series (["" , "b" ], dtype = dtype )
767+ result = ser1 ^ ser2
768+ expected = pd .Series ([False , True ], dtype = bool )
751769 tm .assert_series_equal (result , expected )
0 commit comments