Skip to main content

pytest-spark-mutation-testing

Semantic mutation testing for PySpark pipelines — a pytest plugin that mutates Catalyst plans (joins, filters, aggregates, windows, projections) and scores whether your test suite catches them.

Install

pip install pytest-spark-mutation-testing

Requires Python 3.9+ and PySpark 3.5.x or 4.2.x (4.2 is Scala 2.13-only).

Quick start

cd your-pipeline
pytest --spark-mutate

The plugin runs your suite once unmutated (baseline), discovers every mutation site in the analyzed plans, then re-runs only the affected tests per mutant — fail-fast — and writes:

  • mutation-report.{json,sarif,html} — per-mutant verdicts (KILLED / SURVIVED / TIMED_OUT / NOT_APPLIED / ERRORED) and the mutation score
  • test-value-report.{json,html} — per-test kill attribution that flags redundant test cases

Optional config in your pyproject.toml:

[tool.spark-mutator]
target_modules     = ["my_pipeline.transforms"]   # scope discovery
excluded_mutators  = ["CrossJoinMutator"]         # skip a rule
timeout_multiplier = 2.0                          # per-mutant deadline
min_mutation_score = 80.0                          # CI gate

Documentation

License

Apache-2.0 — see LICENSE.

Release files for pytest-spark-mutation-testing 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pytest-spark-mutation-testing 1.0.1
File Interpreter ABI Platform
pytest_spark_mutation_testing-1.0.1-py3-none-any.whl Python 3 none any Details

Release files / pytest_spark_mutation_testing-1.0.1-py3-none-any.whl

Download URL pytest_spark_mutation_testing-1.0.1-py3-none-any.whl
Size 6.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d543b776a26d6aa5163f77cbee95315385d460b65bb0a09fa013853943fb7e1a
BLAKE2b-256 checksum
How to use checksums
b0dfb6d2f29aa32831d1486440a15121100c7d6ae4ae1dffba5a153e6cba3bb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page