Functions | |
def | read_exclude_file (source) |
def | find_modules (path) |
def | path_to_name (filepath) |
def | test_import (module) |
def | read_exclude_file (source) |
Read all excluded file paths from the given source file. More... | |
def | find_modules (path) |
Returns the paths to all python module files. More... | |
def | path_to_name (filepath) |
Returns the module name for a given file path. More... | |
def | test_import (module) |
Test that the named module can be imported. More... | |
Variables | |
string | PACKAGE |
string | CONDA_BUILD_TEST |
list | DEFAULT_PYTEST_ARGUMENTS |
HERE | |
tuple | BUILDDIR |
tuple | SRCDIR |
tuple | TOPBUILDDIR |
tuple | EXCLUDEFILE |
PYTHONMODDIR = TOPBUILDDIR / "python" / PACKAGE | |
EXCLUDE | |
list | MODULES |
list | args |
string | PACKAGE = "lalframe" |
string | CONDA_BUILD_TEST = "TEST" |
list | DEFAULT_PYTEST_ARGUMENTS |
HERE = Path(__file__).parent.absolute() | |
tuple | BUILDDIR = (HERE / Path(".")).resolve() |
tuple | SRCDIR = (HERE / Path(".")).resolve() |
tuple | TOPBUILDDIR = (HERE / Path("../..")).resolve() |
tuple | EXCLUDEFILE = SRCDIR / "exclude-modules.txt" |
PYTHONMODDIR = Path(import_module(PACKAGE).__path__[0]) | |
EXCLUDE = set(map(path_to_name, read_exclude_file(EXCLUDEFILE))) | |
list | MODULES = [path_to_name(x) for x in sorted(find_modules(PYTHONMODDIR))] |
list | args = sys.argv[1:] or DEFAULT_PYTEST_ARGUMENTS |
def test_python_imports.read_exclude_file | ( | source | ) |
Read all excluded file paths from the given source file.
Definition at line 64 of file test_python_imports.py.
def test_python_imports.find_modules | ( | path | ) |
Returns the paths to all python module files.
Definition at line 81 of file test_python_imports.py.
def test_python_imports.path_to_name | ( | filepath | ) |
Returns the module name for a given file path.
path_to_name("lal/__init__.py") "lal" path_to_name("lal/module.py") "lal.module"
Definition at line 92 of file test_python_imports.py.
def test_python_imports.test_import | ( | module | ) |
Test that the named module can be imported.
Definition at line 111 of file test_python_imports.py.
string test_python_imports.PACKAGE = "lalframe" |
Definition at line 30 of file test_python_imports.py.
string test_python_imports.CONDA_BUILD_TEST = "TEST" |
Definition at line 33 of file test_python_imports.py.
list test_python_imports.DEFAULT_PYTEST_ARGUMENTS |
Definition at line 36 of file test_python_imports.py.
test_python_imports.HERE = Path(__file__).parent.absolute() |
Definition at line 43 of file test_python_imports.py.
tuple test_python_imports.BUILDDIR = (HERE / Path(".")).resolve() |
Definition at line 44 of file test_python_imports.py.
tuple test_python_imports.SRCDIR = (HERE / Path(".")).resolve() |
Definition at line 45 of file test_python_imports.py.
tuple test_python_imports.TOPBUILDDIR = (HERE / Path("../..")).resolve() |
Definition at line 46 of file test_python_imports.py.
tuple test_python_imports.EXCLUDEFILE = SRCDIR / "exclude-modules.txt" |
Definition at line 49 of file test_python_imports.py.
tuple test_python_imports.PYTHONMODDIR = Path(import_module(PACKAGE).__path__[0]) |
Definition at line 54 of file test_python_imports.py.
test_python_imports.EXCLUDE = set(map(path_to_name, read_exclude_file(EXCLUDEFILE))) |
Definition at line 101 of file test_python_imports.py.
list test_python_imports.MODULES = [path_to_name(x) for x in sorted(find_modules(PYTHONMODDIR))] |
Definition at line 102 of file test_python_imports.py.
list test_python_imports.args = sys.argv[1:] or DEFAULT_PYTEST_ARGUMENTS |
Definition at line 120 of file test_python_imports.py.