Skip to content

Commit

Permalink
swap args order for pytest, don't mark anything outside of functional…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
mikealfare committed Dec 11, 2024
1 parent 9377c5f commit c524822
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down
5 changes: 4 additions & 1 deletion tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit c524822

Please sign in to comment.