Skip to content
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

Tests: use the tmp_path fixture instead of tmpdir #242

Merged
merged 6 commits into from
Jun 9, 2020
Merged

Conversation

karlch
Copy link
Owner

@karlch karlch commented Jun 8, 2020

As we can infer from pytest-dev/pytest#7259 or https://github.com/pytest-dev/pytest/projects/4 the long-term plan for pytest is to replace any use of py.path with the now standard-library module pathlib. This removes any uses of the tmpdir fixture and replaces it with the corresponding calls using tmp_path to avoid any surprises in the future.

karlch added 6 commits June 8, 2020 16:38
tmpdir uses a py.path object which will be removed at some point and is
no longer actively maintained.
This simplifies and clarifies some of the path logic here.
This is easier to read at least for me.
There should now be no more calls to tmpdir :)
This ensures we do not accidentally use the tmpdir fixture instead of
tmp_path in the future.
@karlch karlch added the tests Anything to do with the test suite label Jun 8, 2020
@karlch karlch merged commit 26259c1 into master Jun 9, 2020
@karlch karlch deleted the use-tmp_path branch June 9, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Anything to do with the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant