When using the tmp_path factory, the path remains until:
- The system is restarted
- The number of tmp_path objects is greater than the limit (currently 3)
- a basepath is given (This will just overwrite the existing basepath, but will not provide any cleanup).
I propose a flag that cleans up tmp_path objects on completion of the test.
Usage would look like
python -m pytest --autocleanup
This would execute the following steps:
- create a list of each
tmp_path object created.
- execute code
- iterate through the list deleting each tmp_path that was created (if it still exists)
When using the tmp_path factory, the path remains until:
I propose a flag that cleans up
tmp_pathobjects on completion of the test.Usage would look like
python -m pytest --autocleanupThis would execute the following steps:
tmp_pathobject created.