Skip to content

Split unit vs integration tests; drive via Just commands #163

@MatthewCane

Description

@MatthewCane

Rationale

Faster local feedback for unit tests without Docker; clear commands to run suites explicitly.

Files

  • tests/conftest.py, tests under tests/
  • pyproject.toml (pytest config)
  • Justfile

Tasks

  • Introduce @pytest.mark.integration for tests requiring Docker
  • Replace the autouse Docker Compose session fixture with an integration-only fixture used by tests marked integration
  • Update tests to use the integration fixture or add the @pytest.mark.integration marker
  • Update pytest config to stop auto-marking all tests
  • Add Just recipes:
    • pytest-unit: uv run pytest -v -m "not integration"
    • pytest-integration: uv run pytest -v -m integration
    • pytest-all: run both: just pytest-unit && just pytest-integration
  • Optionally keep pytest as an alias to pytest-all

Acceptance criteria

  • just pytest-unit passes locally without Docker
  • just pytest-integration runs only integration tests (with Docker) and passes
  • just pytest-all runs unit then integration suites and passes
  • just --list shows the three new recipes with clear descriptions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions