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 pytest fixtures for tmp dir creation in tests #1988
Use pytest fixtures for tmp dir creation in tests #1988
Conversation
in |
Maybe but they all failed the first time round. I suggest doing them in a separarate pr since this one is working now |
Codecov Report
@@ Coverage Diff @@
## master #1988 +/- ##
=======================================
Coverage 70.59% 70.59%
=======================================
Files 148 148
Lines 19248 19248
=======================================
Hits 13588 13588
Misses 5660 5660 |
This should prevent the unable to unlink tmpdir because pytest has a reference to it failures that we see from time to time. https://docs.pytest.org/en/latest/tmpdir.html#temporary-directories-and-files
There are 3 context managers that I have still not changed. These should probably eventually be rewritten as pytest fixtures.
The pytest fixtures will only create one tmp_path pr test so in tests that requires 2 distinct directories I have used the factory functions to generate another one