Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 19 Aug 19:43
· 26 commits to main since this release

New Features

  • @pytest.mark.sources(*globs) now adds its sources to the run instead of narrowing the --sources set. A collection pass before the run finds marked sources, so they are scheduled, summarised and given a failure budget like declared ones.
  • --skip-marker-sources (ini skip_marker_sources) skips tests carrying a sources marker, and the extra collection pass that finds them.
  • A report header giving the source count, worker count and work items. Without workers it says so, and points at -n auto.
  • source_for is exported from the package.

Changes

  • Workers are opt-in. Passing --sources no longer starts them on your behalf; use -n as with plain pytest-xdist. -n auto starts one worker per source, capped at the CPU count.
  • --sources-maxfail is shared across processes through a per-run file, so it now combines with --dist loadfile, loadscope and loadgroup. The budget there is at most N failures plus any tests already running when the limit is reached. It is refused alongside a --tx spec that puts workers on another machine.
  • Spare workers are dealt to whichever source currently has the largest work item, rather than splitting every source equally. Five workers over three sources now use all five instead of leaving two idle.
  • Documentation moved to docs/GUIDE.md and docs/DESIGN.md, leaving the README as a reference.
  • Pipeline stage modules are separated from a _core/ package. from pytest_sources.source import ... no longer resolves; the top level package API is unchanged.

Fixed

  • A test that parametrises its own source argument is rejected with a usage error instead of silently colliding with the fanout.
  • The summary no longer fails on a test outcome it does not recognise, such as one another plugin introduces.

Full Changelog: v0.1.0...v0.2.0