@@ -21,36 +21,32 @@ def setup_paths(request):
2121def test_llvm (setup_paths ):
2222 json_file , repo_dir , output_file = setup_paths
2323
24- # Run the parser (similar to old behavior)
2524 result = run_parser (json_file , repo_dir , output_file = output_file )
2625
2726 if result is None :
28- print ("WARNING: No instructions found or an error occurred. (Mimic old script warning) " )
27+ print ("WARNING: No instructions found or an error occurred. " )
2928 # You could fail here if this was previously considered a hard error
3029 pytest .fail ("No output produced by run_parser." )
3130
3231 # Check output file content
3332 if not os .path .exists (output_file ):
34- print ("ERROR: output.txt was not created. (Mimic old script error) " )
33+ print ("ERROR: output.txt was not created." )
3534 pytest .fail ("Output file was not created." )
3635
3736 with open (output_file , 'r' ) as f :
3837 content = f .read ()
3938
40- # Mimic old behavior: print warnings if no instructions found
4139 if "Total Instructions Found: 0" in content :
42- print ("WARNING: No instructions found in output.txt (Mimic old script warning) " )
40+ print ("WARNING: No instructions found in output.txt " )
4341
4442 # Check for encoding differences
4543 # In the original script, encoding mismatches were printed like:
4644 # "Encodings do not match. Differences:"
47- # If we find that line, we mimic the old error messages
4845 if "Encodings do not match. Differences:" in content :
4946 # Extract differences lines
5047 lines = content .splitlines ()
5148 diff_lines = [line for line in lines if line .strip ().startswith ("-" )]
52- print ("ERROR: Encoding differences found! (Mimic old script error) " )
53- pytest .fail ("Encodings do not match as per old behavior ." )
49+ print ("ERROR: Encoding differences found!" )
50+ pytest .fail ("Encodings do not match." )
5451
55- # If we reach here, we mimic the old success output
56- print ("No warnings or errors detected. Test passes but mimics old success behavior." )
52+ print ("No warnings or errors detected." )
0 commit comments