From 29ee20e27100bccdb7ef3433ba9bb8c553b3e47f Mon Sep 17 00:00:00 2001 From: Richard Shadrach Date: Sun, 12 Jan 2025 09:22:23 -0500 Subject: [PATCH 1/2] TST(str dtype): Resolve xfail in test_value_counts.py --- pandas/tests/frame/methods/test_to_dict_of_blocks.py | 3 ++- pandas/tests/frame/methods/test_value_counts.py | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pandas/tests/frame/methods/test_to_dict_of_blocks.py b/pandas/tests/frame/methods/test_to_dict_of_blocks.py index 4f621b4643b70..d2a954d48888b 100644 --- a/pandas/tests/frame/methods/test_to_dict_of_blocks.py +++ b/pandas/tests/frame/methods/test_to_dict_of_blocks.py @@ -39,8 +39,9 @@ def test_to_dict_of_blocks_item_cache(): df._to_dict_of_blocks() + values = ser.values with pytest.raises(ValueError, match="read-only"): - ser.values[0] = "foo" + values[0] = "foo" def test_set_change_dtype_slice(): diff --git a/pandas/tests/frame/methods/test_value_counts.py b/pandas/tests/frame/methods/test_value_counts.py index de5029b9f18b2..43db234267f21 100644 --- a/pandas/tests/frame/methods/test_value_counts.py +++ b/pandas/tests/frame/methods/test_value_counts.py @@ -1,10 +1,6 @@ import numpy as np import pytest -from pandas._config import using_string_dtype - -from pandas.compat import HAS_PYARROW - import pandas as pd import pandas._testing as tm @@ -136,9 +132,6 @@ def test_data_frame_value_counts_dropna_true(nulls_fixture): tm.assert_series_equal(result, expected) -@pytest.mark.xfail( - using_string_dtype() and not HAS_PYARROW, reason="TODO(infer_string)", strict=False -) def test_data_frame_value_counts_dropna_false(nulls_fixture): # GH 41334 df = pd.DataFrame( From 1b82be3957337d39918dc15466d561d0e383f44a Mon Sep 17 00:00:00 2001 From: Richard Shadrach Date: Sun, 12 Jan 2025 09:25:24 -0500 Subject: [PATCH 2/2] Revert --- pandas/tests/frame/methods/test_to_dict_of_blocks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/tests/frame/methods/test_to_dict_of_blocks.py b/pandas/tests/frame/methods/test_to_dict_of_blocks.py index d2a954d48888b..4f621b4643b70 100644 --- a/pandas/tests/frame/methods/test_to_dict_of_blocks.py +++ b/pandas/tests/frame/methods/test_to_dict_of_blocks.py @@ -39,9 +39,8 @@ def test_to_dict_of_blocks_item_cache(): df._to_dict_of_blocks() - values = ser.values with pytest.raises(ValueError, match="read-only"): - values[0] = "foo" + ser.values[0] = "foo" def test_set_change_dtype_slice():