Skip to content

Commit fd61adf

Browse files
committed
Add nosemgrep to remaining CompletedProcess fixture in test_test_auto_repair
PR #97 Codacy gate failed on issueThreshold (expected 0, got 1): the third MagicMock(return_value=subprocess.CompletedProcess(...)) fixture (test_truncates_long_diffs, line 63) was missing the nosemgrep suppression that the other three already had. No subprocess is actually launched.
1 parent f3a0987 commit fd61adf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/unit_test/test_test_auto_repair.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def boom(*_a, **_kw):
6060
self.assertEqual(collect_git_diff("/x", runner=boom), "")
6161

6262
def test_truncates_long_diffs(self):
63+
# nosemgrep: dangerous-subprocess-use-audit — fake CompletedProcess for MagicMock; no subprocess is launched.
6364
fake = MagicMock(return_value=subprocess.CompletedProcess(
6465
args=[], returncode=0, stdout="x" * 9999, stderr="",
6566
))

0 commit comments

Comments
 (0)