Skip to content

Make tox tests run cleanly locally #2927

@esafak

Description

@esafak

Issue

tox tests that work in CI are noisy locally. For example, when I run tox -e py -- tests/unit/activation, after the tests are complete, I see a barrage of warnings like

/Users/emre/code/virtualenv/.tox/py/lib/python3.13/site-packages/_pytest/pathlib.py:96: PytestWarning: (rm_rf) error removing /private/var/folders/bh/td1z1dnj4hl76rpjrsj73lmh0000gn/T/pytest-of-emre/garbage-03b8890a-5ddd-4dd9-961a-08721f4ab92e/test_discovery_via_path_in_non0
<class 'OSError'>: [Errno 66] Directory not empty: '/private/var/folders/bh/td1z1dnj4hl76rpjrsj73lmh0000gn/T/pytest-of-emre/garbage-03b8890a-5ddd-4dd9-961a-08721f4ab92e/test_discovery_via_path_in_non0'

followed ultimately by

py: exit 2 (0.70 seconds) /Users/emre/code/virtualenv> coverage report --skip-covered --show-missing pid=89185

Environment

MacOS 15.5
Virtualenv 20.32.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions