I tried to use the norecursedirs option inside setup.cfg to tell py.test not to collect tests from certain directories but it seems it does ignore it.
[tool:pyte
To use pytest.ini (which is recommended, unless you're using tox in which case tox.ini would make sense), call pytest with pytest -c pytest.ini.
In order to prevent my sample not_me_1.py and not_me_2.py from being tested or linted, my pytest.ini is as follows:
[pytest]
addopts = --ignore-glob=not_me_*
[pycodestyle]
ignore = not_me_* ALL