diff --git a/hatch.toml b/hatch.toml index 5ad6c4075..cb96c71d4 100644 --- a/hatch.toml +++ b/hatch.toml @@ -28,12 +28,12 @@ setup = "pre-commit install" code-quality = "pre-commit run --all-files" unit-tests = "python -m pytest {args:tests/unit}" integration-tests = [ - '- python -m pytest -m "group_1" {args:tests/functional}', - '- python -m pytest -m "group_2" {args:tests/functional}', - '- python -m pytest -m "group_3" {args:tests/functional}', - '- python -m pytest -m "group_4" {args:tests/functional}', - '- python -m pytest -m "group_5" {args:tests/functional}', - '- python -m pytest -m "not group_1 and not group_2 and not group_3 and not group_4 and not group_5" {args:tests/functional}', + '- python -m pytest {args:tests/functional} -m "group_1"', + '- python -m pytest {args:tests/functional} -m "group_2"', + '- python -m pytest {args:tests/functional} -m "group_3"', + '- python -m pytest {args:tests/functional} -m "group_4"', + '- python -m pytest {args:tests/functional} -m "group_5"', + '- python -m pytest {args:tests/functional} -m "not group_1 and not group_2 and not group_3 and not group_4 and not group_5"', ] docker-dev = [ "docker build -f docker/dev.Dockerfile -t dbt-snowflake-dev .", diff --git a/tests/functional/conftest.py b/tests/functional/conftest.py index 70cb2901c..025164da3 100644 --- a/tests/functional/conftest.py +++ b/tests/functional/conftest.py @@ -51,7 +51,10 @@ def pytest_collection_modifyitems(config, items): test_root = pathlib.Path(config.rootdir) / "tests" / "functional" for item in items: - test_path = pathlib.Path(item.fspath).relative_to(test_root) + try: + test_path = pathlib.Path(item.fspath).relative_to(test_root) + except ValueError: + continue test_module = test_path.parts[0] if test_module == "adapter": test_module = test_path.parts[1]