From 2474602713853c79e81b4a39681df85db65a4581 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Mar 2021 23:33:56 +0100 Subject: [PATCH] Move the new shitload-of-warning test for level 7 definition --- lib/analyze_test_results.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/analyze_test_results.py b/lib/analyze_test_results.py index dd0a115..c9d03fd 100644 --- a/lib/analyze_test_results.py +++ b/lib/analyze_test_results.py @@ -95,12 +95,9 @@ def level_5(tests): """ alias_traversal_detected = any(t["results"].get("alias_traversal") for t in tests) - too_many_warnings = any(t["results"].get("too_many_warnings") for t in tests) - linter_tests = [t for t in tests if t["test_type"] == "PACKAGE_LINTER"] return not alias_traversal_detected \ - and not too_many_warnings \ and linter_tests != [] \ and linter_tests[0]["results"]["main_result"] == "success" @@ -126,9 +123,11 @@ def level_7(tests): """ linter_tests = [t for t in tests if t["test_type"] == "PACKAGE_LINTER"] - + too_many_warnings = any(t["results"].get("too_many_warnings") for t in tests) + return all(t["results"]["main_result"] == "success" for t in tests) \ and linter_tests != [] \ + and not too_many_warnings \ and "App.qualify_for_level_7" in linter_tests[0]["results"]["success"]