diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..5cc3df0 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1,13 @@ +""" +Adding the __init__.py to the tests/ directory (and its subdirectories) makes them all part of the +same package structure. + +- Allows test modules/files to import from each other (including from modules in different + directories, such as files in tests/cli/ importing from tests/testdb.py). +- Does not require test modules to have unique names. + +This necessitates using the "prepend" (or possibly "append"?) import mode (which is the default). +This setup comes with its own set of caveats. See +https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html for a discussion of how test modules +are imported. +""" diff --git a/tests/benchmarks/__init__.py b/tests/benchmarks/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/cli/__init__.py b/tests/cli/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/cli/test_cli_common.py b/tests/cli/test_common.py similarity index 100% rename from tests/cli/test_cli_common.py rename to tests/cli/test_common.py diff --git a/tests/cli/test_cli_dist.py b/tests/cli/test_dist.py similarity index 100% rename from tests/cli/test_cli_dist.py rename to tests/cli/test_dist.py diff --git a/tests/cli/test_cli_query.py b/tests/cli/test_query.py similarity index 100% rename from tests/cli/test_cli_query.py rename to tests/cli/test_query.py diff --git a/tests/cli/test_cli_signatures.py b/tests/cli/test_signatures.py similarity index 100% rename from tests/cli/test_cli_signatures.py rename to tests/cli/test_signatures.py diff --git a/tests/cli/test_cli_tree.py b/tests/cli/test_tree.py similarity index 100% rename from tests/cli/test_cli_tree.py rename to tests/cli/test_tree.py diff --git a/tests/conftest.py b/tests/conftest.py index e3431b6..4467af3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,8 @@ import numpy as np import pytest from sqlalchemy import create_engine -from testdb import TestDB + +from .testdb import TestDB @pytest.fixture(scope='session') diff --git a/tests/data/__init__.py b/tests/data/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/db/__init__.py b/tests/db/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/db/test_db_migrate.py b/tests/db/test_migrate.py similarity index 100% rename from tests/db/test_db_migrate.py rename to tests/db/test_migrate.py diff --git a/tests/db/test_db_models.py b/tests/db/test_models.py similarity index 100% rename from tests/db/test_db_models.py rename to tests/db/test_models.py diff --git a/tests/db/test_db_refdb.py b/tests/db/test_refdb.py similarity index 100% rename from tests/db/test_db_refdb.py rename to tests/db/test_refdb.py diff --git a/tests/db/test_db_sqla.py b/tests/db/test_sqla.py similarity index 100% rename from tests/db/test_db_sqla.py rename to tests/db/test_sqla.py diff --git a/tests/sigs/__init__.py b/tests/sigs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/sigs/test_sigs_base.py b/tests/sigs/test_base.py similarity index 100% rename from tests/sigs/test_sigs_base.py rename to tests/sigs/test_base.py diff --git a/tests/sigs/test_sigs_calc.py b/tests/sigs/test_calc.py similarity index 100% rename from tests/sigs/test_sigs_calc.py rename to tests/sigs/test_calc.py diff --git a/tests/sigs/test_sigs_convert.py b/tests/sigs/test_convert.py similarity index 100% rename from tests/sigs/test_sigs_convert.py rename to tests/sigs/test_convert.py diff --git a/tests/sigs/test_sigs_hdf5.py b/tests/sigs/test_hdf5.py similarity index 100% rename from tests/sigs/test_sigs_hdf5.py rename to tests/sigs/test_hdf5.py diff --git a/tests/util/__init__.py b/tests/util/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/util/test_util_indexing.py b/tests/util/test_indexing.py similarity index 100% rename from tests/util/test_util_indexing.py rename to tests/util/test_indexing.py diff --git a/tests/util/test_util_io.py b/tests/util/test_io.py similarity index 100% rename from tests/util/test_util_io.py rename to tests/util/test_io.py diff --git a/tests/util/test_util_json.py b/tests/util/test_json.py similarity index 100% rename from tests/util/test_util_json.py rename to tests/util/test_json.py diff --git a/tests/util/test_util_misc.py b/tests/util/test_misc.py similarity index 100% rename from tests/util/test_util_misc.py rename to tests/util/test_misc.py diff --git a/tests/util/test_util_progress.py b/tests/util/test_progress.py similarity index 100% rename from tests/util/test_util_progress.py rename to tests/util/test_progress.py diff --git a/tests/util/test_util_typing.py b/tests/util/test_typing.py similarity index 100% rename from tests/util/test_util_typing.py rename to tests/util/test_typing.py