Skip to content

Commit fd2c231

Browse files
authored
TST: Fix undefined variables in tests (pandas-dev#50741)
CI: Fix undefined variables in tests
1 parent 9116f32 commit fd2c231

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/tests/extension/test_arrow.py

+3
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ def test_groupby_extension_transform(self, data_for_grouping, request):
528528
def test_groupby_extension_apply(
529529
self, data_for_grouping, groupby_apply_op, request
530530
):
531+
pa_dtype = data_for_grouping.dtype.pyarrow_dtype
531532
with tm.maybe_produces_warning(
532533
PerformanceWarning,
533534
pa_version_under7p0 and not pa.types.is_duration(pa_dtype),
@@ -770,6 +771,7 @@ def test_value_counts(self, all_data, dropna, request):
770771
super().test_value_counts(all_data, dropna)
771772

772773
def test_value_counts_with_normalize(self, data, request):
774+
pa_dtype = data.dtype.pyarrow_dtype
773775
with tm.maybe_produces_warning(
774776
PerformanceWarning,
775777
pa_version_under7p0 and not pa.types.is_duration(pa_dtype),
@@ -869,6 +871,7 @@ def test_sort_values_missing(
869871

870872
@pytest.mark.parametrize("ascending", [True, False])
871873
def test_sort_values_frame(self, data_for_sorting, ascending, request):
874+
pa_dtype = data_for_sorting.dtype.pyarrow_dtype
872875
with tm.maybe_produces_warning(
873876
PerformanceWarning,
874877
pa_version_under7p0 and not pa.types.is_duration(pa_dtype),

0 commit comments

Comments
 (0)