Skip to content

Include public examples in the standard verification story #140

Description

@lbliii

Context

Examples are public teaching material and many have their own tests, but the standard pytest config only collects tests/. That means example-specific tests can silently rot unless someone remembers to run them manually.

Evidence

  • pyproject.toml sets testpaths = ["tests"].
  • find examples -maxdepth 2 -type f -name 'test_*.py' | wc -l reports 26 example test files.
  • tests/test_examples.py only smoke-runs a curated list of run.py examples and explicitly says output correctness is not checked.
  • Many app.py examples have colocated tests under examples/*/test_*.py that are outside make test and make test-cov.

Proposed Scope

  • Add a make test-examples target and decide whether it belongs in verify-stability.
  • Update CI to run example tests, or move example tests into tests/examples/ if that is the intended collection model.
  • Keep optional-dependency examples isolated with skips/importorskip where needed.

Done When

  • Example tests run in an explicit documented gate.
  • New examples have a clear testing convention.
  • examples/README.md, tests/test_examples.py, and CI agree on what is runnable.

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