Skip to content

Commit 7b2af19

Browse files
Alexander Martynenkoclaude
andcommitted
fix: scope e2e skip marker to only e2e tests in pytest_collection_modifyitems
The hook was adding a skip marker to ALL collected items, causing integration tests to be skipped when run alongside e2e tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d3cabbd commit 7b2af19

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/e2e/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717

1818

1919
def pytest_collection_modifyitems(config, items):
20-
"""Skip all E2E tests when not running inside the E2E environment."""
20+
"""Skip E2E tests when not running inside the E2E environment."""
2121
if os.environ.get("KATRAN_E2E") != "1":
2222
skip = pytest.mark.skip(reason="KATRAN_E2E not set (run via run-e2e.sh)")
2323
for item in items:
24-
item.add_marker(skip)
24+
if "e2e" in item.nodeid.split("::")[0]:
25+
item.add_marker(skip)
2526

2627

2728
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)