Skip to content

Commit acbba97

Browse files
simonjayhawkinsjreback
authored andcommitted
CLN: some imports in pandas/tests/frame/test_dtypes.py (#29995)
1 parent 1efd00c commit acbba97

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pandas/tests/frame/test_dtypes.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype
7+
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, IntervalDtype
88

99
import pandas as pd
1010
from pandas import (
@@ -699,14 +699,7 @@ def test_astype_categorical(self, dtype):
699699
expected = DataFrame({k: Categorical(d[k], dtype=dtype) for k in d})
700700
tm.assert_frame_equal(result, expected)
701701

702-
@pytest.mark.parametrize(
703-
"cls",
704-
[
705-
pd.api.types.CategoricalDtype,
706-
pd.api.types.DatetimeTZDtype,
707-
pd.api.types.IntervalDtype,
708-
],
709-
)
702+
@pytest.mark.parametrize("cls", [CategoricalDtype, DatetimeTZDtype, IntervalDtype])
710703
def test_astype_categoricaldtype_class_raises(self, cls):
711704
df = DataFrame({"A": ["a", "a", "b", "c"]})
712705
xpr = "Expected an instance of {}".format(cls.__name__)

0 commit comments

Comments
 (0)