diff --git a/tests/conftest.py b/tests/conftest.py index 6a9f938..347cc7d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -39,6 +39,16 @@ no_windows = pytest.mark.skipif( ) +def repodir(): + """Return the abspath to the repo directory. + """ + dirname = os.path.dirname + dirpath = os.path.abspath( + dirname(dirname(os.path.realpath(__file__))) + ) + return dirpath + + def pytest_addoption(parser): parser.addoption( "--ll", action="store", dest='loglevel', diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 071febf..fe357e8 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -9,7 +9,7 @@ from os import path import pytest import pexpect -from .test_docs_examples import repodir +from conftest import repodir # TODO: diff --git a/tests/test_docs_examples.py b/tests/test_docs_examples.py index 67b34ee..73e6a69 100644 --- a/tests/test_docs_examples.py +++ b/tests/test_docs_examples.py @@ -11,15 +11,7 @@ import shutil import pytest - -def repodir(): - """Return the abspath to the repo directory. - """ - dirname = os.path.dirname - dirpath = os.path.abspath( - dirname(dirname(os.path.realpath(__file__))) - ) - return dirpath +from conftest import repodir def examples_dir():