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

Use tmp_path instead of tmp_dir. #960

Merged
merged 1 commit into from
Feb 12, 2020

Conversation

gabrieldemarmiesse
Copy link
Contributor

This is needed for #957. I wanted to do a separate PR to avoid making it difficult to review.

tmp_path creates a temporary directory and return a pathlib object, as opposed to the tmp_dir made by hand returning a py._path which is deprecated. See pytest-dev/pytest#3985 .

Having py._path objects doesn't make the type checker very happy :p

Copy link
Collaborator

@haifeng-jin haifeng-jin left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
I really saves the effort to add the fixture to every test file.
It is good to be merged.

Just paste this for future reference.
https://docs.pytest.org/en/latest/tmpdir.html

@haifeng-jin haifeng-jin merged commit 451a909 into keras-team:master Feb 12, 2020
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.

2 participants