Skip to content

Commit

Permalink
Avoid redundant error message
Browse files Browse the repository at this point in the history
Summary:
Right now, running tests can give:
```
Expected an issue with code 5005, but no issue was found.
Expected 1 issues with code 5005, but found 0 issues.
```

This can be confusing since this is referring to the same problem. Let's fix it.

Reviewed By: tianhan0

Differential Revision: D64470602

fbshipit-source-id: 5c8615305053c6f8e87439575cea777078caba11
  • Loading branch information
arthaud authored and facebook-github-bot committed Oct 16, 2024
1 parent a26195c commit 5e65518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/pysa_integration_tests/runner_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,9 @@ def compare_issues_to_test_annotations(
else:
pass # pass

if len(issues) != number_expected_issues:
if len(issues) != number_expected_issues and len(test_failures) == 0:
test_failures.append(
f"Expected {number_expected_issues} issues with code {code}, but found {len(issues)} issues"
f"Expected {number_expected_issues} issues with code {code}, but found {len(issues)} issues."
)

if len(test_failures) > 0:
Expand Down

0 comments on commit 5e65518

Please sign in to comment.