Factor `repodir()` helper into conftest.py
parent
a49deb46f1
commit
a934eb063c
|
@ -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',
|
||||
|
|
|
@ -9,7 +9,7 @@ from os import path
|
|||
import pytest
|
||||
import pexpect
|
||||
|
||||
from .test_docs_examples import repodir
|
||||
from conftest import repodir
|
||||
|
||||
|
||||
# TODO:
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue