Skip to content

Commit

Permalink
Merge pull request #34 from kikkomep/fix/check-count
Browse files Browse the repository at this point in the history
fix: check count on textual report
  • Loading branch information
kikkomep authored Nov 6, 2024
2 parents 5b91de6 + 5d508f9 commit a4eb460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rocrate_validator/cli/commands/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def __compute_profile_stats__(validation_settings: dict):
# count the checks
num_checks = len(
[_ for _ in requirement.get_checks_by_level(LevelCollection.get(severity.name))
if not _.overridden or _.requirement.profile == profile])
if not _.overridden])
check_count_by_severity[severity] += num_checks
requirement_checks_count += num_checks

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ def test_compute_stats(fake_profiles_path):
assert len(requirement.get_checks()) == len(requirement.get_checks_by_level(LevelCollection.get("REQUIRED")))

# check the number of requirement checks
assert stats["total_checks"] == len(requirements[0].get_checks())
assert stats["total_checks"] == len([_ for _ in requirements[0].get_checks() if not _.overridden])

logger.error(stats)

0 comments on commit a4eb460

Please sign in to comment.