Skip to content

Commit f5a83fc

Browse files
committed
Fixed asserts in integration tests with sonar issues
1 parent 61cb4ca commit f5a83fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/codemodder/codemods/test/integration_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def _assert_results_fields(self, results, output_path):
9090
for ref in self.codemod_instance.references
9191
]
9292

93-
assert ("detectionTool" in result) == bool(self.sonar_issues_json)
94-
assert ("detectionTool" in result) == bool(self.sonar_hotspots_json)
93+
assert ("detectionTool" in result) == bool(self.sonar_issues_json) or (
94+
"detectionTool" in result
95+
) == bool(self.sonar_hotspots_json)
9596

9697
# TODO: if/when we add description for each url
9798
for reference in result["references"][

0 commit comments

Comments
 (0)