-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
pytest is leaving behind symlink'd directories in tmpdir #5232
Comments
Updated title (oops) |
I've narrowed this down to the simplest test case. This test.py file:
leaves two folders in the temp directory:
The latter being a symlink to the first. How do I get rid of the crufty symlink'd folders? |
currently not, but its fixable |
Line 129 in 803d688
|
Thanks. What about just cleaning up symlinks that pytest created on exit? I suppose I could just do that in my test code too... |
@RonnyPfannschmidt I know this is historical, but do you remember why pytest creates that symlink? Regardless, how about if we remove the symlink when pytest exits, as @markmelvin proposes? |
@nicoddemus the symlink was always a courtesy to enable quickly finding the current test/current basetemp even after pytest exited |
My regression tests are leaving behind a symlink'd folder ending in "current" for every test executed. This ends up publishing duplicate folders as artifacts into my CI system. From what I have seen these folders should be cleaned up by pytest automatically, no?
I'm using the tmpdir_factory fixture in various session-level fixtures, and tmpdir in various tests to create files in the temp folder like so:
And
It does this on both Python 3.5 and 3.7 on both Ubuntu Linux 16.04 and 19.04. I am running pytest via pipenv and My pipenv environment looks like this:
The text was updated successfully, but these errors were encountered: