From fbccdd3f70ceea8eb465c2248a7297411c999097 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 14 Mar 2013 14:15:00 +0100 Subject: [PATCH 1/3] Run doctests in the main py.test run --- pytest.ini | 5 ++++- tox.ini | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pytest.ini b/pytest.ini index 4afbf164..5f33ed4a 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,5 +1,8 @@ [pytest] -addopts = --assert=plain +addopts = --assert=plain --doctest-modules + +# Ignore broken files in blackbox test directories +norecursedirs = .* completion refactor # Activate `clean_jedi_cache` fixture for all tests. This should be # fine as long as we are using `clean_jedi_cache` as a session scoped diff --git a/tox.ini b/tox.ini index 25014940..6b2bad01 100644 --- a/tox.ini +++ b/tox.ini @@ -5,9 +5,6 @@ deps = pytest commands = py.test [] - # Doctests can't be run with the main tests because then py.test - # tries to import broken python files under test/*/. - py.test --doctest-modules {toxinidir}/jedi [testenv:py25] deps = simplejson From 3881f8d6edb56b725cb599f90251ad89c01af6cb Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 14 Mar 2013 14:31:32 +0100 Subject: [PATCH 2/3] Do not collect setup.py as a test --- conftest.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 00000000..044963bb --- /dev/null +++ b/conftest.py @@ -0,0 +1 @@ +collect_ignore = ["setup.py"] From 95aed3c54e97222bbf4e4ffc435b6998fee84322 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Thu, 14 Mar 2013 19:20:20 +0100 Subject: [PATCH 3/3] Exclude docs directory from test search --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 5f33ed4a..2be72740 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,7 +2,7 @@ addopts = --assert=plain --doctest-modules # Ignore broken files in blackbox test directories -norecursedirs = .* completion refactor +norecursedirs = .* docs completion refactor # Activate `clean_jedi_cache` fixture for all tests. This should be # fine as long as we are using `clean_jedi_cache` as a session scoped