Skip to content

Commit

Permalink
fix duplicate headline
Browse files Browse the repository at this point in the history
  • Loading branch information
grabin-dev committed Apr 1, 2020
1 parent 7de1f47 commit 2200ddc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions demisto_sdk/commands/lint/lint_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def report_unit_tests(self, lint_status: dict, pkgs_status: dict, return_exit_co
for pkg, status in pkgs_status.items():
if status.get("images"):
if status.get("images")[0].get("pytest_json", {}).get("report", {}).get("tests"):
if (not headline_printed and self._verbose) or (EXIT_CODES["pytest"] & return_exit_code):
if (not headline_printed and self._verbose) and (EXIT_CODES["pytest"] & return_exit_code):
# Log unit-tests
sentence = " Unit Tests "
print(f"\n{Colors.Fg.cyan}{'#' * len(sentence)}")
Expand Down Expand Up @@ -444,7 +444,6 @@ def report_unit_tests(self, lint_status: dict, pkgs_status: dict, return_exit_co
print(f"\n{Colors.Fg.cyan}{'#' * len(sentence)}")
print(f"{sentence}")
print(f"{'#' * len(sentence)}{Colors.reset}")
headline_printed = True
print(f"\n{Colors.Fg.red}Failed Unit-tests:{Colors.reset}")
for fail_pack in lint_status["fail_packs_pytest"]:
print(wrapper_pack.fill(f"{Colors.Fg.red}{fail_pack}{Colors.reset}"))
Expand Down

0 comments on commit 2200ddc

Please sign in to comment.