/ tests / core-tests / conftest.py
conftest.py
 1  """
 2  Pytest configuration for core-tests.
 3  
 4  This module contains fixtures and configuration for the agent core tests.
 5  """
 6  import pytest
 7  
 8  
 9  def pytest_configure(config: pytest.Config) -> None:
10      """Register custom markers."""
11      config.addinivalue_line(
12          "markers",
13          "unit: marks tests as unit tests (fast, no external dependencies)"
14      )
15      config.addinivalue_line(
16          "markers",
17          "integration: marks tests as integration tests (may require external services)"
18      )
19  
20  
21  def pytest_addoption(parser: pytest.Parser) -> None:
22      """Add custom command line options for compatibility with run.sh --core."""
23      try:
24          parser.addoption(
25              "--run-e2e",
26              action="store_true",
27              default=False,
28              help="Accepted for compatibility; core-tests have no E2E tests.",
29          )
30      except ValueError:
31          pass  # Already registered by another conftest (e.g., when run from tests/ root)