-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: tests.indexes.numeric.py #41192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REF: tests.indexes.numeric.py #41192
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally if you can remove all explict construction and use fixtures (can be in the class itself is fine) instead.
pandas/tests/indexes/test_numeric.py
Outdated
_index_cls = Float64Index | ||
_dtype = np.float64 | ||
|
||
def create_index(self) -> Float64Index: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could make these into fixtures instead
Ok, I have changed those to fixtures. |
This PR ensures that all index instantiation calls in
tests.indexes.numeric.py
use the_holder
class variable instead of the actual index class. This will make it easier to extend the existing tests to tests for the newNumIndex
in #41153.Also renames
_holder
to_index_cls
for all oftests.indexes
. I think this is a more descriptive name.