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

Switch pytest fixture from tmpdir to tmp_path #27417

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Dec 1, 2023

tmp_path is the more modern version providing standard pathlib.Path objects and preferred nowadays https://docs.pytest.org/en/7 .4.x/reference/reference.html#tmpdir.

Copy link
Contributor

@oscargus oscargus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subject to getting rid of the unused imports.

tmp_path is the more modern version providing standard
pathlib.Path objects and preferred nowadays https://docs.pytest.org/en/7
.4.x/reference/reference.html#tmpdir.
@timhoffm
Copy link
Member Author

timhoffm commented Dec 1, 2023

Done. I should definitively set up precommit.

@oscargus
Copy link
Contributor

oscargus commented Dec 1, 2023

Yeah, pre-commit is pretty nice once it works!

Anyone can merge on green.

@story645
Copy link
Member

story645 commented Dec 1, 2023

do we want this backported for later PRs writing against this code or let the backporting happen as part of backporting those prs?

@timhoffm timhoffm added this to the v3.9.0 milestone Dec 1, 2023
@timhoffm
Copy link
Member Author

timhoffm commented Dec 1, 2023

I would not backport. The likelihood of backporting changes to tests is quite small.

@story645 story645 merged commit ac74b74 into matplotlib:main Dec 1, 2023
39 of 40 checks passed
@timhoffm timhoffm deleted the tmp_path branch December 4, 2023 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants