Skip to content

v0.4.2

Choose a tag to compare

@IKrysanov IKrysanov released this 06 Jun 16:22
· 16 commits to main since this release
4952760

0.4.2 - 2026-06-06

Added

  • PytestOperator(dry_run=True) -- new optional argument that switches
    the run to pytest's --collect-only mode. Test bodies do NOT
    execute; pytest only collects them (imports modules, runs collection-
    time fixtures, walks the test tree). Intended as a pre-flight task in
    a DAG: verifies the test path resolves on the worker, that imports
    succeed (so the worker has all required deps installed), and that
    collection itself succeeds (no syntax errors, no missing fixtures).
    Collection errors surface the same way normal test failures do --
    the task fails with TestsFailedError under the default
    fail_on_test_failure=True. The user's pytest_args are not
    mutated; the --collect-only flag is appended to a per-call
    effective list at execute() time, so retries see the original
    configuration and downstream introspection of the operator is honest.
    Default dry_run=False -- behaviour unchanged for existing tasks.
  • JSONResultParser now reports TestRunResult.total from
    summary.collected when summary.total is 0 and no per-case
    entries were parsed. This is exactly the shape pytest-json-report
    writes in --collect-only mode (zero "ran" tests, N collected).
    Normal runs are unaffected -- the fallback only kicks in when there
    is no other signal. The JUnit XML for --collect-only contains
    no <testcase> entries at all (<testsuite tests="0">), so the
    JUnit parser cannot report a count for dry-run; the operator
    docstring notes this limitation.