Skip to content

Leftover subcover_*.pth files in site-packages #2029

@mgorny

Description

@mgorny

Describe the bug
When running coverage, it may create subcover_*.pth files that don't seem to be cleaned up afterwards.

To Reproduce
Python 3.13.6
b48ae28

tox -e py313
find -name 'subcover*.pth'

Note all the files left over in tox's site-packages.

Expected behavior
Coverage cleaning up files on exit, or — well — not writing them there.

Additional context
For us, it's a problem since after running the test suite, all these files are installed along with coverage. However, I can imagine that when running tests against an installed package (i.e. in packages that install tests and support running them after install), these files will be written directly to system site-packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions