File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,11 @@ def __init__(self) -> None:
7070
7171def clean_concolic_tests (test_suite_code : str ) -> str :
7272 try :
73- can_parse = True
7473 tree = ast .parse (test_suite_code )
75- except SyntaxError :
74+ can_parse = True
75+ except Exception :
7676 can_parse = False
77+ tree = None
7778
7879 if not can_parse :
7980 return AssertCleanup ().transform_asserts (test_suite_code )
@@ -87,7 +88,6 @@ def clean_concolic_tests(test_suite_code: str) -> str:
8788 new_body .append (ast .Expr (value = stmt .test .left ))
8889 else :
8990 new_body .append (stmt )
90-
9191 else :
9292 new_body .append (stmt )
9393 node .body = new_body
Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ def main(args: Namespace | None = None) -> ArgumentParser:
103103 replay_test_paths = []
104104 if parsed_args .module and unknown_args [0 ] == "pytest" :
105105 pytest_splits , test_paths = pytest_split (unknown_args [1 :])
106+ if pytest_splits is None or test_paths is None :
107+ console .print (f"❌ Could not find test files in the specified paths: { unknown_args [1 :]} " )
108+ console .print (f"Current working directory: { Path .cwd ()} " )
109+ console .print ("Please ensure the test directory exists and contains test files." )
110+ sys .exit (1 )
106111
107112 if len (pytest_splits ) > 1 :
108113 processes = []
You can’t perform that action at this time.
0 commit comments