File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import re
4+
35import ast
46import concurrent .futures
57import os
@@ -1186,12 +1188,20 @@ def run_and_parse_tests(
11861188 )
11871189 return TestResults (), None
11881190 if run_result .returncode != 0 and testing_type == TestingMode .BEHAVIOR :
1189- logger .info (
1191+ logger .debug (
11901192 f"Nonzero return code { run_result .returncode } when running tests in "
11911193 f"{ ', ' .join ([str (f .instrumented_behavior_file_path ) for f in test_files .test_files ])} .\n "
11921194 f"stdout: { run_result .stdout } \n "
11931195 f"stderr: { run_result .stderr } \n "
11941196 )
1197+ if 'ModuleNotFoundError' in run_result .stdout :
1198+ from rich .text import Text
1199+ match = re .search (r'^.*ModuleNotFoundError.*$' , run_result .stdout , re .MULTILINE ).group ()
1200+ panel = Panel (
1201+ Text .from_markup (f"⚠️ { match } " , style = "bold red" ),
1202+ expand = False ,
1203+ )
1204+ console .print (panel )
11951205 if testing_type in {TestingMode .BEHAVIOR , TestingMode .PERFORMANCE }:
11961206 results , coverage_results = parse_test_results (
11971207 test_xml_path = result_file_path ,
You can’t perform that action at this time.
0 commit comments