diff --git a/pyproject.toml b/pyproject.toml index 48cd2ab..cb4d057 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -127,7 +127,9 @@ pytest_add_cli_args_test_selection = [ "tests/test_coverage_thresholds.py", "tests/test_numerical_contracts.py", ] -mutate_only_covered_lines = true +# Mutating the complete bounded target set is both stronger and avoids mutmut's +# in-process native-extension unload/reload crash during covered-line discovery. +mutate_only_covered_lines = false on_dependency_change = "rerun" [tool.uv] diff --git a/tests/test_quality_policy.py b/tests/test_quality_policy.py index 8e98fca..56d85e2 100644 --- a/tests/test_quality_policy.py +++ b/tests/test_quality_policy.py @@ -2,12 +2,20 @@ from __future__ import annotations +import tomllib from copy import deepcopy from datetime import date +from pathlib import Path from scripts import check_quality_policy as quality +def test_mutation_campaign_avoids_native_extension_reload_mode(): + pyproject = tomllib.loads(Path("pyproject.toml").read_text()) + + assert pyproject["tool"]["mutmut"]["mutate_only_covered_lines"] is False + + def _policy(): return { "minimums": dict(quality.BASELINE_FLOORS),