pip uninstall pytest-xdist leaves files behind when pytest has created files via its assertion rewriting:
./.venv/lib/python3.7/site-packages/xdist
โโโ __pycache__
โย ย โโโ dsession.cpython-37-PYTEST.pyc
โย ย โโโ looponfail.cpython-37-PYTEST.pyc
โย ย โโโ newhooks.cpython-37-PYTEST.pyc
โย ย โโโ plugin.cpython-37-PYTEST.pyc
โย ย โโโ remote.cpython-37-PYTEST.pyc
โย ย โโโ report.cpython-37-PYTEST.pyc
โย ย โโโ _version.cpython-37-PYTEST.pyc
โย ย โโโ workermanage.cpython-37-PYTEST.pyc
โโโ scheduler
โโโ __pycache__
โโโ each.cpython-37-PYTEST.pyc
โโโ load.cpython-37-PYTEST.pyc
โโโ loadfile.cpython-37-PYTEST.pyc
โโโ loadscope.cpython-37-PYTEST.pyc
3 directories, 12 files
pip 18.1 (python 3.7.2)
I've noticed this, because pytest.importorskip will not skip it then.
Weird, at first glance I don't think this is anything related to xdist in particular, but for every pytest plugin. ๐ค
Yeah, likely.
maybe we should take #4730 and default to .pytest_cache/pycache (even on older python versions) -- since pytest controls the pyc loading anyway there's nothing binding us to the source directories
@asottile
Sounds like a good plan.
Most helpful comment
maybe we should take #4730 and default to
.pytest_cache/pycache(even on older python versions) -- since pytest controls the pyc loading anyway there's nothing binding us to the source directories