| 326 | |
| 327 | |
| 328 | class SubclassedSeries(Series): |
| 329 | _metadata = ["testattr", "name"] |
| 330 | |
| 331 | @property |
| 332 | def _constructor(self): |
| 333 | # For testing, those properties return a generic callable, and not |
| 334 | # the actual class. In this case that is equivalent, but it is to |
| 335 | # ensure we don't rely on the property returning a class |
| 336 | # See https://github.com/pandas-dev/pandas/pull/46018 and |
| 337 | # https://github.com/pandas-dev/pandas/issues/32638 and linked issues |
| 338 | return lambda *args, **kwargs: SubclassedSeries(*args, **kwargs) |
| 339 | |
| 340 | @property |
| 341 | def _constructor_expanddim(self): |
| 342 | return lambda *args, **kwargs: SubclassedDataFrame(*args, **kwargs) |
| 343 | |
| 344 | |
| 345 | class SubclassedDataFrame(DataFrame): |
no outgoing calls
no test coverage detected