Skip to content

Commit 4facd99

Browse files
committed
reformat
1 parent e9248b4 commit 4facd99

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/tests/extension/test_arrow.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -816,16 +816,18 @@ def test_value_counts_returns_pyarrow_int64(self, data):
816816
result = data.value_counts()
817817
assert result.dtype == ArrowDtype(pa.int64())
818818

819-
def test_value_counts_no_numpy_fallback(self, data, arrow_to_numpy_tracker):
819+
@pytest.mark.parametrize("normalize", [False, True])
820+
def test_value_counts_no_numpy_fallback(
821+
self, data, normalize, arrow_to_numpy_tracker
822+
):
820823
# Ensure value_counts doesn't unnecessarily convert Arrow arrays to NumPy
821824
data = data[:10]
822825
ser = pd.Series(data)
823826

824-
ser.value_counts()
825-
assert not arrow_to_numpy_tracker()
827+
ser.value_counts(normalize=normalize)
826828

827-
ser.value_counts(normalize=True)
828-
assert not arrow_to_numpy_tracker()
829+
numpy_called = arrow_to_numpy_tracker()
830+
assert not numpy_called
829831

830832
_combine_le_expected_dtype = "bool[pyarrow]"
831833

0 commit comments

Comments
 (0)