# HG changeset patch # User Thomas De Schampheleire # Date 2015-05-14 21:42:26 # Node ID 7187c1707eda75b1867e1d4b9a6a8f3c2a1eda8d # Parent 7a5db341a942a4bea1c433846ad040e8ae0d8a68 tests: restrict pytest test collection to kallithea/tests When the kallithea root directory contains a populated virtualenv, pytest would also collect tests in python packages installed there. Restrict the tests to be considered to any test_*.py file inside kallithea/tests. Additionally, by renaming unwanted test files in kallithea/tests/scripts to _not_ match this pattern, we can completely get rid of the 'norecursedirs' option. diff --git a/kallithea/tests/scripts/test_concurency.py b/kallithea/tests/scripts/manual_test_concurrency.py rename from kallithea/tests/scripts/test_concurency.py rename to kallithea/tests/scripts/manual_test_concurrency.py diff --git a/kallithea/tests/scripts/test_crawler.py b/kallithea/tests/scripts/manual_test_crawler.py rename from kallithea/tests/scripts/test_crawler.py rename to kallithea/tests/scripts/manual_test_crawler.py diff --git a/setup.cfg b/setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,8 @@ detailed-errors = 1 nologcapture = 1 [pytest] -norecursedirs = .* *.egg kallithea/tests/scripts +# only look for tests in kallithea/tests +python_files = kallithea/tests/**/test_*.py [compile_catalog] domain = kallithea