Skip to content

Commit 281ae71

Browse files
committed
CLN: remove F821 flake8 error in test case (#22009)
1 parent 8a3a20e commit 281ae71

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/tests/frame/test_dtypes.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import numpy as np
1010
from pandas import (DataFrame, Series, date_range, Timedelta, Timestamp,
1111
Categorical, compat, concat, option_context)
12-
from pandas.compat import u, PY2
12+
from pandas.compat import u
1313
from pandas import _np_version_under1p14
1414

1515
from pandas.core.dtypes.dtypes import DatetimeTZDtype, CategoricalDtype
@@ -356,9 +356,10 @@ def test_select_dtypes_datetime_with_tz(self):
356356
expected = df3.reindex(columns=[])
357357
assert_frame_equal(result, expected)
358358

359-
@pytest.mark.parametrize(
360-
"dtype", [str, "str", np.string_, "S1",
361-
"unicode", np.unicode_, "U1"] + ([unicode] if PY2 else []))
359+
@pytest.mark.parametrize("dtype", [
360+
str, "str", np.string_, "S1", "unicode", np.unicode_, "U1",
361+
compat.text_type
362+
])
362363
@pytest.mark.parametrize("arg", ["include", "exclude"])
363364
def test_select_dtypes_str_raises(self, dtype, arg):
364365
df = DataFrame({"a": list("abc"),

0 commit comments

Comments
 (0)