Skip to content

Add pytest markers for selective test execution #12

@manavgup

Description

@manavgup

Context

Borrowed from IBM/mcp-context-forge which uses markers like @pytest.mark.slow, @pytest.mark.e2e, @pytest.mark.integration.

FastStack has 387 tests but no way to run subsets by category. All tests run every time (~5s now, but will grow).

What to do

  • Define markers in pyproject.toml: unit, integration, e2e, slow
  • Tag existing tests:
    • tests/test_core/unit
    • tests/test_templates/unit
    • tests/test_cli/integration (they scaffold real projects in tmp dirs)
  • Add Makefile targets:
    • make test-unitpytest -m unit
    • make test-integrationpytest -m integration
    • make test-fastpytest -m "not slow"
  • Suppress PytestUnknownMarkWarning

Acceptance criteria

  • make test-unit runs only core + template tests
  • make test-integration runs only CLI tests
  • make test still runs everything

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions