Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test nested PandasArray #24993
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
Test nested PandasArray #24993
Changes from 11 commits
558cdbe
38e7413
9122bb6
86948a1
afb1bee
642b01a
518315c
6d7e0d8
bf1efc9
cc246c9
bea8de0
7cf5583
358df86
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
can you add a comment here on what this particular file is testing. (as a casual glance makes it look very similar to test_numpy.py)
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.
@TomAugspurger but still this does not answer the question of why you duplicated things
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.
does https://github.com/pandas-dev/pandas/pull/24993/files#diff-c77963c2757e522c9ed516402633c932R6 make sense?
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.
it makes sense, I suppose enough. Problem is a future reader may not understand exactly what you are getting at here.
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.
@TomAugspurger I fear that I may have led you in the wrong direction with the first example on just including the fixture that you want the value of in the function signature. that was just to show that fixtures can be added to the function signature and that additional unwanted permutations would not occur.
from the pytest docs on request.getfixturevalue.. "Declaring fixtures via function argument is recommended where possible. But if you can only decide whether to use another fixture at test setup time, you may use this function to retrieve it inside a fixture or test function body."
hence why i mentioned the function argument approach first.
@jreback is right about adding markers, and the
pytest.mark.usefixtures
is probably the appropriate marker to use.if this marker was used only on tests that depended on the
dtype
fixture, then the autouse fixture I suggested could be used without therequest.getfixturevalue('dtype')
anddtype
included in the fixture signature along with therequest
fixture which gives access to the class, instance and function to determine if the test should be skipped.My comments should not be taken as a reason not to merge. A follow-on PR could look into this approach.
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.
I'm relatively happy with current approach. It's lower-tech which is fine for me in tests.