Remove/replace some unneeded usages of py.path#8440
Merged
bluetech merged 1 commit intopytest-dev:mainfrom Mar 14, 2021
Merged
Conversation
nicoddemus
approved these changes
Mar 14, 2021
|
|
||
| def test_failure_demo_fails_properly(testdir): | ||
| target = testdir.tmpdir.join(os.path.basename(failure_demo)) | ||
| def test_failure_demo_fails_properly(pytester): |
Member
There was a problem hiding this comment.
as a followup we might want to make this use examples
Member
Author
There was a problem hiding this comment.
This one I'm not exactly sure where it's used, so left it as is.
doc/en/example/multipython.py
Outdated
| def dumps(self, obj): | ||
| dumpfile = self.picklefile.dirpath("dump.py") | ||
| dumpfile.write( | ||
| dumpfile = self.picklefile.parent / "dump.py" |
Member
There was a problem hiding this comment.
lets use Path.with_name for those cases instead of path.parent / "newname"
doc/en/reference/unittest.rst
Outdated
| tmpdir.chdir() # change to pytest-provided temporary directory | ||
| tmpdir.join("samplefile.ini").write("# testdata") | ||
| def initdir(self, tmp_path): | ||
| os.chdir(tmp_path) # change to pytest-provided temporary directory |
Member
There was a problem hiding this comment.
followup consideration: do we want to put monkeypatch.chdir in here for giving a better example
Member
Author
There was a problem hiding this comment.
Good idea, I changed to that.
e34d3f9 to
59251e8
Compare
Member
|
failures is unrelated doc linkage issue cc @evildmp as that's probably going to be part of great loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As discussed in #8251 (comment) I am trying to find remaining py.path usages by completely removing it and seeing what breaks. These are the simple cases I found, mostly in the docs and tests. No user-facing changes.