From 2462681c62faab9b91bdbfa474275c06770135ee Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Sat, 9 May 2026 17:27:57 -0700 Subject: [PATCH] ci(mutation): disable rerun and xdist plugins for mutmut runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mutmut's in-process pytest.main() call hits `INTERNALERROR: no option named 'filtered_exceptions'` from pytest-retry's pytest_configure hook. Reruns are also wrong for mutation testing — a "failed" mutant test that gets retried would mask which mutants are killed vs. survive. Disable retry, rerunfailures, and xdist via pytest_add_cli_args in [tool.mutmut]. --- pyproject.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1a5a3e8fd2c..122900ebaf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -290,6 +290,17 @@ tests_dir = [ also_copy = [ "litellm/", ] +# Disable rerun/parallel plugins for mutation runs: +# - pytest-retry triggers an `INTERNALERROR: no option named 'filtered_exceptions'` +# when invoked via mutmut's in-process `pytest.main()` call. +# - rerunning a "failed" test on a mutant would mask which mutants are killed +# vs. survive, so reruns are wrong for mutation testing regardless. +# - xdist is unnecessary inside mutmut (mutmut handles its own parallelism). +pytest_add_cli_args = [ + "-p", "no:retry", + "-p", "no:rerunfailures", + "-p", "no:xdist", +] [tool.coverage.run] source = ["litellm"]