-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Use indices fixture in tests/indexes/test_base.py #32963
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
TST: Use indices fixture in tests/indexes/test_base.py #32963
Conversation
(parametrize over indices_dict keys with indirect=True). Defaults to string | ||
index if no keys are provided. | ||
""" | ||
key = getattr(request, "param", "string") |
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.
This line makes that using index
without parametrization is identical to writing @pytest.mark.parametrize("indices", ["string"], indirect=True)
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.
Thanks @SaturnFromTitan for doing this. This was intended to be a follow-up to #28865 #28865 (comment)
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.
This is now replaced by string_index
Something I've been trying to do that you might be interested in: these tests are a mix between using |
Good idea @jbrockmendel, I can look into that. Is there a ticket for replacing |
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.
Thanks @SaturnFromTitan lgtm. could be a smaller diff with #28865 (comment) . wdyt?
(parametrize over indices_dict keys with indirect=True). Defaults to string | ||
index if no keys are provided. | ||
""" | ||
key = getattr(request, "param", "string") |
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.
Thanks @SaturnFromTitan for doing this. This was intended to be a follow-up to #28865 #28865 (comment)
+1 for renaming the fixture to I wonder about a good transition strategy though. I could create a fixture |
sounds good. that'll keep the diff here smaller here while allowing others to give their opinions on naming fixtures in general before making changes to other modules. |
A much more digestible diff now @simonjayhawkins :) |
I find |
@jbrockmendel I kinda agree. Instead of |
This reverts commit 1eba26d.
…s, [string], indirect=True)
@jreback @jbrockmendel @simonjayhawkins |
@jreback CI is finally green |
sorry a small comment, also merge master and ping on green. |
…e(indices, [string], indirect=True)" This reverts commit 2a3e611.
@jreback Using indirect instead of a separate fixture now + CI is green |
thanks! I think it’s worth mentioning in our contributing docs on how - when to use indirect fixtures |
xref: #33128 |
part of #30914
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff