If you run py.test with --flake8 and -vv then the tests run very slowly and it also uses a huge amount of RAM.
This is caused by flake8's extreme amount of debug sent stderr when run with -vv, which is in turn captured by py.test.
A workaround is to set -vv via addopts config which isn't detected by flake8 but still applies to py.test.
In testing with just 8 files this reduced the time to run from 16 seconds to just 1.
If you run py.test with --flake8 and -vv then the tests run very slowly and it also uses a huge amount of RAM.
This is caused by flake8's extreme amount of debug sent stderr when run with -vv, which is in turn captured by py.test.
A workaround is to set -vv via addopts config which isn't detected by flake8 but still applies to py.test.
In testing with just 8 files this reduced the time to run from 16 seconds to just 1.