Add note in documentation to help modernize code bases to use pathlib#10331
Merged
nicoddemus merged 1 commit intopytest-dev:mainfrom Oct 8, 2022
Merged
Conversation
nicoddemus
reviewed
Oct 7, 2022
doc/en/how-to/tmp_path.rst
Outdated
|
|
||
| .. code-block:: bash | ||
|
|
||
| pytest -p no:legacypath-tmpdir |
Member
There was a problem hiding this comment.
Shouldn't this be just -p no:legacypath?
Contributor
Author
There was a problem hiding this comment.
Good question
I used the registered name defined in legacypath.py.
From a quick test:
def test_tmpdir(tmpdir):
assert True
def test_tmpdir_factory(tmpdir_factory):
assert Trueeither no:legacypath or no:legacypath-tmpdir triggers the expected error.
However, using pytest --trace-config, legacypath is listed there, so you are correct.
I will correct that.
763c61b to
a28d595
Compare
Member
|
@bluetech the backport workflow failed with: This is not supercritical to port right now, just mentioned in case you were not aware. |
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.
The legacypath plugin handles the tmpdir and tmpdir_factory which should be update to their modern counterparts that uses pathlib.
Disabling this plugin allows developer to easily find and thus update the use of these fixtures.
Fixes #10199