Skip to content

Commit ce3746d

Browse files
committed
fix: simplify pytest configuration to resolve CI collection errors
- Removed custom pytest options that could cause collection failures - Simplified conftest.py to only handle integration test marking - The complex pytest_runtest_setup was causing issues with option registration - Exit code 2 typically indicates test collection failure
1 parent 1e4c23c commit ce3746d

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

tests/integration/conftest.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,8 @@
33
import pytest
44

55

6-
def pytest_configure(config):
7-
"""Add custom markers for integration tests."""
8-
# Marker is already defined in pyproject.toml
9-
pass
10-
11-
126
def pytest_collection_modifyitems(config, items):
137
"""Automatically mark all tests in integration directory."""
148
for item in items:
159
if "integration" in str(item.fspath):
1610
item.add_marker(pytest.mark.integration)
17-
18-
19-
def pytest_runtest_setup(item):
20-
"""Skip integration tests if running only unit tests."""
21-
if "integration" in item.keywords and item.config.getoption("--unit-only"):
22-
pytest.skip("Skipping integration test in unit-only mode")
23-
24-
25-
def pytest_addoption(parser):
26-
"""Add custom command line options."""
27-
parser.addoption(
28-
"--unit-only",
29-
action="store_true",
30-
default=False,
31-
help="Run only unit tests, skip integration tests",
32-
)
33-
parser.addoption(
34-
"--integration-only",
35-
action="store_true",
36-
default=False,
37-
help="Run only integration tests, skip unit tests",
38-
)

0 commit comments

Comments
 (0)