Closed asfaltboy closed 6 years ago
I would check if maybe you need to add a
[pytest]
norecursedirs = ...
setting to pytest.ini to make sure pytest does not descend into folders it should not?
I'm not sure there's anything I would like to exclude from pytest, just from flake8. And anyhow, why would adding --flake8
extend the collection of tests?
Because it will recurse into e.g. ".tox" folders if you have been running that, and thus add whole instances of standard libraries etc. to the lists in your junit.xml files?
That makes full sense! It's been a while since I had the issue, so no need to keep it open anyway.
tl;dr The
junit.xml
report generated when running with--flake8
is about x130 (130 times) of the report size without--flake8
.When running
py.test
on a relatively large project without using--flake8
option, the behavior is "ok".py.test
collects about 160 "items" from a project of about 160 modules, and outputs ajunit.xml
report around 1.4MB in size.In contrast, when running with
--flake8
option, on the same source project,py.test
collects about 314 items and outputs a report around 190MB in size.My environment is:
My
pytest.ini
is:Seems that
pytest==2.9.2
does not result in the same behaviour. Specifically, if existing compiled pyc/cache files of the modules exist (from the pytest==3.0.1 run), many of the collected items are skipped, resulting in a small xml file. However, if cache/pyc files are cleared, the tests report is again at 190MB. Running without--flake8
again results in a 1.4MB xml.