-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Use pytest tmp file management fixtures instead of ensure_clean[_path|_dir] #26984
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
Comments
I think the issue should address pytest replacements for +1 for using pytest fixtures thoughout. |
@jgehrcke I am pretty ok with doing this change, does it require a specific version min for pytest?; we should update the docs in contributing.rst (not sure if we have any text about this though) |
probably not all at once? used in many places.
we'll probably want to use the newer tmp_path (and tmp_path_factory) were added in pytest 3.9.0 |
we should do this post dropping 3.5 (I don't know if we have an issue for that yet). |
fair enough. dropping py3.5 probably not far away, but probably OK to use when adding new tests/fixtures? did use |
I think we've cleaned up |
Opened as of discussion in #26818.
tests/io/test_pytables.py
uses a context manager calledensure_clean_path
. It might be worth using the pytesttmp_path
fixture instead which I think provides everything we need with less code (also easier to understand for new contributors familiar with pytest). And it provides even a little more functionality, comparison:ensure_clean_path
).ensure_clean_path
).ensure_clean_path
. That can be useful for debugging after test failure.Note: the pytest-managed temp files are removed in a rolling fashion across test runner invocations so that storage space requirement does not grow indefinitely with the number of invocations.
Cf. comment #26818 (comment)
The text was updated successfully, but these errors were encountered: