We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f23c2dc commit 4db0f65Copy full SHA for 4db0f65
tests/conftest.py
@@ -1,6 +1,7 @@
1
import os
2
import shutil
3
import tarfile
4
+import pytest
5
from pathlib import Path
6
from typing import Final, Optional, Set
7
@@ -224,3 +225,11 @@ def pytest_sessionfinish(
224
225
226
assert lock_file is not None
227
lock_file.release()
228
+
229
230
+# This is required explicitly becuase when the source does not have any
231
+# mutable code, mutmut does not run the forced fail condition.
232
+@pytest.fixture(autouse=True)
233
+def mutmut_forced_fail():
234
+ if os.environ.get("MUTANT_UNDER_TEST") == "fail":
235
+ pytest.fail("Forced fail for mutmut sanity check")
0 commit comments