Repository navigation
v0.2.0
New Features
@pytest.mark.sources(*globs)now adds its sources to the run instead of narrowing the--sourcesset. 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(iniskip_marker_sources) skips tests carrying asourcesmarker, 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_foris exported from the package.
Changes
- Workers are opt-in. Passing
--sourcesno longer starts them on your behalf; use-nas with plain pytest-xdist.-n autostarts one worker per source, capped at the CPU count. --sources-maxfailis shared across processes through a per-run file, so it now combines with--dist loadfile,loadscopeandloadgroup. The budget there is at mostNfailures plus any tests already running when the limit is reached. It is refused alongside a--txspec 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.mdanddocs/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
sourceargument 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