From 36288c51341267b2b506e0a2bbdbf20f52a6b2c4 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 2 Apr 2014 12:48:35 +0200 Subject: [PATCH] fix issue493: don't run tests in doc directory with ``python setup.py test`` (use tox -e doctesting for that) --- CHANGELOG | 3 +++ setup.py | 2 +- tox.ini | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 23e1f4e7d..8625c182a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -42,6 +42,9 @@ NEXT (2.6) - fix issue492: avoid leak in test_writeorg. Thanks Marc Abramowitz. +- fix issue493: don't run tests in doc directory with ``python setup.py test`` + (use tox -e doctesting for that) + 2.5.2 ----------------------------------- diff --git a/setup.py b/setup.py index 07c6c7b0b..1cd79f875 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ class PyTest(Command): PPATH=[x for x in os.environ.get("PYTHONPATH", "").split(":") if x] PPATH.insert(0, os.getcwd()) os.environ["PYTHONPATH"] = ":".join(PPATH) - errno = subprocess.call([sys.executable, 'pytest.py']) + errno = subprocess.call([sys.executable, 'pytest.py', '--ignore=doc']) raise SystemExit(errno) if __name__ == '__main__': diff --git a/tox.ini b/tox.ini index d48ff874f..27b1a598c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] distshare={homedir}/.tox/distshare -envlist=flakes,py26,py27,pypy,py27-pexpect,py33-pexpect,py27-nobyte,py32,py33,py27-xdist,py33-xdist,py27-trial,py33-trial +envlist=flakes,py26,py27,pypy,py27-pexpect,py33-pexpect,py27-nobyte,py32,py33,py27-xdist,py33-xdist,py27-trial,py33-trial,doctesting [testenv] changedir=testing @@ -92,6 +92,12 @@ commands= make clean make html +[testenv:doctesting] +basepython=python3.3 +changedir=doc/en +deps=PyYAML +commands= py.test -rfsxX --junitxml={envlogdir}/junit-{envname}.xml [] + [testenv:regen] basepython=python changedir=doc/en