We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a4064 commit dd097c3Copy full SHA for dd097c3
pandas/tests/dtypes/test_inference.py
@@ -238,16 +238,14 @@ def test_is_list_like_generic():
238
# is_list_like was yielding false positives for Generic classes in python 3.11
239
T = TypeVar("T")
240
241
- class Base:
242
- def __init__(self, x: int):
243
- self._x = x
244
-
245
- class Gen(Base, Generic[T]):
+ class MyDataFrame(DataFrame, Generic[T]):
246
...
247
248
- fooc = Gen[float]
+ tstc = MyDataFrame[int]
+ tst = MyDataFrame[int]({"x": [1, 2, 3]})
249
250
- assert not inference.is_list_like(fooc)
+ assert not inference.is_list_like(tstc)
+ assert isinstance(tst, DataFrame)
251
252
253
def test_is_sequence():
0 commit comments