|
9 | 9 | import numpy as np
|
10 | 10 | from pandas import (DataFrame, Series, date_range, Timedelta, Timestamp,
|
11 | 11 | Categorical, compat, concat, option_context)
|
12 |
| -from pandas.compat import u, PY2 |
| 12 | +from pandas.compat import u |
13 | 13 | from pandas import _np_version_under1p14
|
14 | 14 |
|
15 | 15 | from pandas.core.dtypes.dtypes import DatetimeTZDtype, CategoricalDtype
|
@@ -356,9 +356,10 @@ def test_select_dtypes_datetime_with_tz(self):
|
356 | 356 | expected = df3.reindex(columns=[])
|
357 | 357 | assert_frame_equal(result, expected)
|
358 | 358 |
|
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 | + ]) |
362 | 363 | @pytest.mark.parametrize("arg", ["include", "exclude"])
|
363 | 364 | def test_select_dtypes_str_raises(self, dtype, arg):
|
364 | 365 | df = DataFrame({"a": list("abc"),
|
|
0 commit comments