Factor `repodir()` helper into conftest.py

bug_in_debug
Tyler Goodlet 2020-10-13 14:49:31 -04:00
parent a49deb46f1
commit a934eb063c
3 changed files with 12 additions and 10 deletions

View File

@ -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',

View File

@ -9,7 +9,7 @@ from os import path
import pytest
import pexpect
from .test_docs_examples import repodir
from conftest import repodir
# TODO:

View File

@ -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():