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

Replace tmpdir test fixture with tmp_path #191

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

eerovaher
Copy link
Contributor

pytest provides two fixtures for creating temporary directories: the recommended tmp_path, which uses pathlib.Path from the Python standard library, and the legacy tmpdir, which uses a third party library. The tests here now use tmp_path instead of tmpdir.

For the same reason the testdir fixture should be replaced with pytester, but that would require the minimum supported pytest version to be 6.2.

`pytest` provides two fixtures for creating temporary directories: the
recommended `tmp_path`, which uses `pathlib.Path` from the Python
standard library, and the legacy `tmpdir`, which uses a third party
library. The tests here now use `tmp_path` instead of `tmpdir`.
@eerovaher eerovaher added this to the 0.12.2 milestone Oct 7, 2022
@bsipocz bsipocz merged commit ef0a3e1 into scientific-python:main Oct 7, 2022
@eerovaher eerovaher deleted the replace-tmpdir branch October 7, 2022 19:58
@bsipocz
Copy link
Member

bsipocz commented Oct 7, 2022

Thanks @eerovaher!

As for the other update, I'm not sure we want to bump the minimum version to 6.2, yet. It's not yet out for 2 years, and the proposed changes are of very little benefit, while we have to be sure that our downstream will all be on pytest 6.2+ already.

@bsipocz bsipocz modified the milestones: 0.12.2, 0.13 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants