Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed leftover print and reverted some changes
Browse files Browse the repository at this point in the history
andrecsilva committed Jan 24, 2025
1 parent d287a0a commit 552f0eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/codemodder/codemods/test/integration_utils.py
Original file line number Diff line number Diff line change
@@ -99,9 +99,11 @@ def _assert_run_fields(self, run, output_path):
assert run[
"commandLine"
] == f'codemodder {self.code_dir} --output {output_path} --codemod-include={self.codemod_instance.id} --path-include={self.code_filename} --path-exclude=""' + (
f" --sonar-json={self.sonar_issues_json}" if self.sonar_issues_json else ""
f" --sonar-issues-json={self.sonar_issues_json}"
if self.sonar_issues_json
else ""
) + (
f" --sonar-json={self.sonar_hotspots_json}"
f" --sonar-hotspots-json={self.sonar_hotspots_json}"
if self.sonar_hotspots_json
else ""
)
@@ -140,7 +142,6 @@ def _assert_results_fields(self, results, output_path):
change = [
result for result in result["changeset"] if result["path"] == output_path
][0]
print(change["diff"])
assert change["path"] == output_path
assert change["diff"] == self.expected_diff

@@ -196,9 +197,9 @@ def test_file_rewritten(self, codetf_schema):
]

if self.sonar_issues_json:
command.append(f"--sonar-json={self.sonar_issues_json}")
command.append(f"--sonar-issues-json={self.sonar_issues_json}")
if self.sonar_hotspots_json:
command.append(f"--sonar-json={self.sonar_hotspots_json}")
command.append(f"--sonar-hotspots-json={self.sonar_hotspots_json}")

self.write_original_code()
self.write_original_dependencies()

0 comments on commit 552f0eb

Please sign in to comment.