forked from goodboy/tractor
1
0
Fork 0

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): def pytest_addoption(parser):
parser.addoption( parser.addoption(
"--ll", action="store", dest='loglevel', "--ll", action="store", dest='loglevel',

View File

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

View File

@ -11,15 +11,7 @@ import shutil
import pytest import pytest
from conftest import repodir
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 examples_dir(): def examples_dir():