Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix directories not cleaned up after test
The `test_rmtree_errorhandler_reraises_error` test creates a directory that the user is unable to read under pytest's `tmpdir`. Once the test session end pytest will fail to clean this up due to permissions error and emit a warning like: /home/user/src/pip/.nox/test-3-12/lib/python3.12/site-packages/_pytest/pathlib.py:98: PytestWarning: (rm_rf) error removing /tmp/pytest-of-user/garbage-23e907a9-3e54-40bd-89e4-d70150b10f61/test_rmtree_errorhandler_rerai0 <class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( This restores behaviour from b5c1c76, that commit mentions fixing 'failing tests' though I'm not sure which failures that addresses and if they were related to restoring the file permissions. Also make consistent use of `pathlib.Path` methods rather than mixing them with `os.` methods
- Loading branch information