Closed pytestbot closed 9 years ago
Original comment by Jurko Gospodnetić (BitBucket: jurko, GitHub: jurko):
Have you tried running pytest with the --collect-only
command-line option? That should tell you the exact list of tests collected, including all related information - module, test class, test class instance, test method/function.
I do not think pytest makes a copy of your tests anywhere :smile: so more than likely you simply forgot to remove whatever location pytest is collecting those tests from.
For example, I occasionally remove a test module, rerun a py2to3 transformation and then run py3 tests, only to find the removed tests still being run. This happens because py2to3 converts existing py2 modules to py3 in some build
folder but does not remove existing py3 modules in that build
folder for which there is no longer a corresponding py2 module. A simple fix for my situation is to manually remove the build
folder when something like that occurs.
Hope this helps.
Best regards, Jurko Gospodnetić
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):
pytest won't load tests from pyc files only -- it only collects ones that have a .py files. And indeed, pytest itself certainly does not copy files. Please check your environment and what directories are actually collected like Jurko suggested. If anything, this is a case of coming to IRC (#pylib or #python) and asking for help there.
Originally reported by: Mantas Zilinskis (BitBucket: montiniz, GitHub: montiniz)
i just started using pytest for my django projects. couple days ago playing around with a test project i noticed that pytest sometimes would run some test functions which were already deleted. did not pay attention to that then. today i started new django project with pytest-bdd, pytest-django. after creating some test function, ran tests. then decided to remove one test function. ran the test again and noticed that pytest collected the deleted test. removed all pyc files from working direcotry, cleared all pycahe directories, ran tests and it still collected the deleted test. whatever i tried wouldn't help. i'm running on virtualenv, python 2.7, django 1.6., MacOSX 10.9.1, SublimeText 3beta. what would be the way to debug this?