Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Oct 17, 2023
1 parent 1332c5a commit 67bb899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion integration_tests/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _run_idempotency_chec(self, command):
if pathlib.Path(self.output_path).exists():
with open(self.output_path, "r", encoding="utf-8") as f:
codetf = json.load(f)
assert codetf["results"] == []
assert codetf["results"][0]["changeset"] == []

with open(self.code_path, "r", encoding="utf-8") as f:
still_new_code = f.read()
Expand Down
5 changes: 2 additions & 3 deletions tests/test_codemodder.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ def test_reporting(self, mock_reporting, dry_run):
args_to_reporting = mock_reporting.call_args_list[0][0]
assert len(args_to_reporting) == 4
_, _, _, results_by_codemod = args_to_reporting
# assert len(results_by_codemod) == 2

for codemod_results in results_by_codemod:
assert len(codemod_results["changeset"]) > 0
registry = load_registered_codemods()
assert len(results_by_codemod) == len(registry.codemods)

@mock.patch("codemodder.codemods.base_codemod.semgrep_run")
def test_no_codemods_to_run(self, mock_semgrep_run):
Expand Down

0 comments on commit 67bb899

Please sign in to comment.