diff --git a/tests/test_utils/__init__.py b/tests/test_utils/__init__.py index 5eda62a..16281fe 100644 --- a/tests/test_utils/__init__.py +++ b/tests/test_utils/__init__.py @@ -1,10 +1 @@ -from os.path import dirname, join, abspath - -# Base dir of project, contains subdirs "tests" and "oletools" and README.md -PROJECT_ROOT = dirname(dirname(dirname(abspath(__file__)))) - -# Directory with test data, independent of current working directory -DATA_BASE_DIR = join(PROJECT_ROOT, 'tests', 'test-data') - -# Directory with source code -SOURCE_BASE_DIR = join(PROJECT_ROOT, 'oletools') +from .utils import * diff --git a/tests/test_utils/utils.py b/tests/test_utils/utils.py new file mode 100644 index 0000000..b3b9005 --- /dev/null +++ b/tests/test_utils/utils.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +"""Utils generally useful for unittests.""" + +import os +from os.path import dirname, join, abspath + + +# Base dir of project, contains subdirs "tests" and "oletools" and README.md +PROJECT_ROOT = dirname(dirname(dirname(abspath(__file__)))) + +# Directory with test data, independent of current working directory +DATA_BASE_DIR = join(PROJECT_ROOT, 'tests', 'test-data') + +# Directory with source code +SOURCE_BASE_DIR = join(PROJECT_ROOT, 'oletools')