Copilot fix unvectorized tests for classes #416
Closed
+73
−30
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.
fixes gh-415
Is on top of gh-414:
expand_dimstuple axes #414 adds a second test forexpand_dims@pytest.mark.unvectorizedonly works for standalone functions@pytest.mark.unvectorized, drafted by CopilotSo the test update is localized to
test_manipulation_functions.py, and the fix to gh-415 is only inconftest.py.Now that fix is horrifying. Do we really need to do
setattr(item.cls, ...), or, as initial Copilot's attempt was,item.obj.__self__.__class__.EDIT: asked upstream, https://groups.google.com/g/hypothesis-users/c/6K6WPR5knAs --- and there's a recommended alternative, which is now used here.
So thanks to Copilot for helping me start this, but in the end the score is Copilot 0, Liam DeVoe 1.
EDIT2 : draft status until gh-414 is in, to separate concerns.