summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Jehannet <julien.jehannet@logilab.fr>2010-07-30 17:02:21 +0200
committerJulien Jehannet <julien.jehannet@logilab.fr>2010-07-30 17:02:21 +0200
commite0832048ca922827eebad278d6aa18e920843a58 (patch)
treeb4e0934fb494aa1a47a950ce2eadea1e09797632
parent1888afe05020e10d2d00bda7fbaa9865cf98f124 (diff)
downloadlogilab-common-e0832048ca922827eebad278d6aa18e920843a58.tar.gz
pytest: don't retest build/ directory (coming from setuptools)
Use STD_BLACKLIST instead of raw extension list in PyTester
-rw-r--r--pytest.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/pytest.py b/pytest.py
index 77cbad3..53b9d1c 100644
--- a/pytest.py
+++ b/pytest.py
@@ -88,11 +88,8 @@ With those tag::
you can filter the function with a simple python expression
* ``toto`` and ``titi`` match ``rouge``
-
* ``toto``, ``tata`` and ``titi``, match ``rouge or carre``
-
* ``tata`` and ``titi`` match``rouge ^ carre``
-
* ``titi`` match ``rouge and not carre``
"""
__docformat__ = "restructuredtext en"
@@ -119,7 +116,7 @@ from time import time, clock
import warnings
from logilab.common.fileutils import abspath_listdir
-from logilab.common import testlib
+from logilab.common import testlib, STD_BLACKLIST
import doctest
import unittest
@@ -221,8 +218,7 @@ def load_pytest_conf(path, parser):
def project_root(parser, projdir=os.getcwd()):
"""try to find project's root and add it to sys.path"""
- curdir = osp.abspath(projdir)
- previousdir = curdir
+ previousdir = curdir = osp.abspath(projdir)
testercls = PyTester
conf_file_path = osp.join(curdir, CONF_FILE)
if osp.isfile(conf_file_path):
@@ -364,7 +360,7 @@ class PyTester(object):
"""
here = os.getcwd()
for dirname, dirs, _ in os.walk(here):
- for skipped in ('CVS', '.svn', '.hg'):
+ for skipped in STD_BLACKLIST:
if skipped in dirs:
dirs.remove(skipped)
basename = osp.basename(dirname)