diff options
Diffstat (limited to 'tests/test_self.py')
-rw-r--r-- | tests/test_self.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_self.py b/tests/test_self.py index 27bf17cf6..9f33d745c 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -718,11 +718,15 @@ class TestRunTC: ], code=0, ) + # Need the old evaluation formula to test a negative score + # failing below a negative --fail-under threshold self._runtest( [ "--fail-under", "-9", "--enable=all", + "--evaluation", + "0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)", join(HERE, "regrtest_data", "fail_under_minus10.py"), ], code=22, @@ -732,6 +736,8 @@ class TestRunTC: "--fail-under", "-5", "--enable=all", + "--evaluation", + "0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)", join(HERE, "regrtest_data", "fail_under_minus10.py"), ], code=22, @@ -777,6 +783,9 @@ class TestRunTC: f"--fail-on={fo_msgs}", "--enable=all", join(HERE, "regrtest_data", fname), + # Use the old form of the evaluation that can go negative + "--evaluation", + "0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)", ], code=out, ) |