Skip to content

Commit fe0fb39

Browse files
update tests for no-pyarrow
1 parent 4e4079e commit fe0fb39

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/tests/copy_view/test_methods.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ def test_infer_objects(using_copy_on_write, using_infer_string):
960960

961961
if using_copy_on_write:
962962
assert np.shares_memory(get_array(df2, "a"), get_array(df, "a"))
963-
if using_infer_string and HAS_PYARROW:
963+
if using_infer_string:
964964
assert not tm.shares_memory(get_array(df2, "b"), get_array(df, "b"))
965965
else:
966966
assert np.shares_memory(get_array(df2, "b"), get_array(df, "b"))
@@ -1000,7 +1000,7 @@ def test_infer_objects_no_reference(using_copy_on_write, using_infer_string):
10001000
df.iloc[0, 3] = Timestamp("2018-12-31")
10011001
if using_copy_on_write:
10021002
assert np.shares_memory(arr_a, get_array(df, "a"))
1003-
if using_infer_string and HAS_PYARROW:
1003+
if using_infer_string:
10041004
# note that the underlying memory of arr_b has been copied anyway
10051005
# because of the assignment, but the EA is updated inplace so still
10061006
# appears the share memory
@@ -1011,7 +1011,7 @@ def test_infer_objects_no_reference(using_copy_on_write, using_infer_string):
10111011
assert np.shares_memory(arr_d, get_array(df, "d"))
10121012

10131013

1014-
def test_infer_objects_reference(using_copy_on_write):
1014+
def test_infer_objects_reference(using_copy_on_write, using_infer_string):
10151015
df = DataFrame(
10161016
{
10171017
"a": [1, 2],
@@ -1034,7 +1034,8 @@ def test_infer_objects_reference(using_copy_on_write):
10341034
df.iloc[0, 3] = Timestamp("2018-12-31")
10351035
if using_copy_on_write:
10361036
assert not np.shares_memory(arr_a, get_array(df, "a"))
1037-
assert not np.shares_memory(arr_b, get_array(df, "b"))
1037+
if not using_infer_string or HAS_PYARROW:
1038+
assert not np.shares_memory(arr_b, get_array(df, "b"))
10381039
assert np.shares_memory(arr_d, get_array(df, "d"))
10391040

10401041

0 commit comments

Comments
 (0)