Skip to content

Conversation

@rustamali9183
Copy link
Contributor

Remove redundant subclass assertion in TestDatetimeTZDtype.test_subclass, TestPeriodDtype.test_subclass, TestIntervalDtype.test_subclass

The assertion issubclass(type(a), type(a)) is always true for regular
classes and doesn’t test any meaningful behavior. The remaining assertion
still checks the intended subclass relationship.

Closes #63120.

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rhshadrach rhshadrach added Testing pandas testing functions or related to the test suite Clean labels Nov 16, 2025
@rhshadrach rhshadrach added this to the 3.0 milestone Nov 16, 2025
@rhshadrach rhshadrach merged commit 27a3271 into pandas-dev:main Nov 16, 2025
49 of 51 checks passed
@rhshadrach
Copy link
Member

Thanks @rustamali9183

@rustamali9183 rustamali9183 deleted the remove-redundant-issubclass branch November 17, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possible redundant assertion issubclass(type(a), type(a))

2 participants