summaryrefslogtreecommitdiff
path: root/logilab/common/pytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/pytest.py')
-rw-r--r--logilab/common/pytest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/logilab/common/pytest.py b/logilab/common/pytest.py
index b79e835..04ad2f4 100644
--- a/logilab/common/pytest.py
+++ b/logilab/common/pytest.py
@@ -209,8 +209,10 @@ def load_pytest_conf(path, parser):
return namespace.get("CustomPyTester", PyTester)
-def project_root(parser, projdir=os.getcwd()):
+def project_root(parser, projdir=None):
"""try to find project's root and add it to sys.path"""
+ if projdir is None:
+ projdir = os.getcwd()
previousdir = curdir = osp.abspath(projdir)
testercls = PyTester
conf_file_path = osp.join(curdir, CONF_FILE)