-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorplugin: tmpdirrelated to the tmpdir builtin pluginrelated to the tmpdir builtin pluginstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topic
Description
Currently it seems pytest never cleans up the temporary directories it creates. Is this intended?
I can see how it can be useful when tests fail and one wants to inspect the contents of the temporary folder - but it can also cause a lot of trouble with long-running systems (I had the harddisk of a VM fill up because >2 GB of pytest tempfiles accumulated) or systems not cleaning the tempdir (Windows, I'm looking at you!).
I can think of some solutions to this:
- Add a new argument and always clean up tempdirs after a test unless that argument is given.
- Only clean up tempdirs for passing tests, and keep them for failing tests
- Clean up tempdirs after x runs (when a new run is started), or after they reached a certain age treshold.
smheidrich, rommguy and jayonthegreen
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorplugin: tmpdirrelated to the tmpdir builtin pluginrelated to the tmpdir builtin pluginstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topic