@@ -223,7 +223,8 @@ def test_sort():
223223result: [0, 1, 2, 3, 4, 5]
224224"""
225225 assert out_str == results2 [0 ].stdout
226- assert compare_test_results (test_results , results2 )
226+ match , _ = compare_test_results (test_results , results2 )
227+ assert match
227228 finally :
228229 fto_path .write_text (original_code , "utf-8" )
229230 test_path .unlink (missing_ok = True )
@@ -368,7 +369,8 @@ def test_sort():
368369 assert test_results [1 ].return_value == ([0 , 1 , 2 , 3 , 4 , 5 ],)
369370 out_str = """codeflash stdout : BubbleSorter.sorter() called\n """
370371 assert test_results [1 ].stdout == out_str
371- assert compare_test_results (test_results , test_results )
372+ match , _ = compare_test_results (test_results , test_results )
373+ assert match
372374 assert test_results [2 ].id .function_getting_tested == "BubbleSorter.__init__"
373375 assert test_results [2 ].id .test_function_name == "test_sort"
374376 assert test_results [2 ].did_pass
@@ -396,7 +398,8 @@ def test_sort():
396398 testing_time = 0.1 ,
397399 )
398400
399- assert compare_test_results (test_results , results2 )
401+ match , _ = compare_test_results (test_results , results2 )
402+ assert match
400403
401404 # Replace with optimized code that mutated instance attribute
402405 optimized_code = """
@@ -491,7 +494,8 @@ def sorter(self, arr):
491494 )
492495 assert new_test_results [3 ].runtime > 0
493496 assert new_test_results [3 ].did_pass
494- assert not compare_test_results (test_results , new_test_results )
497+ match , _ = compare_test_results (test_results , new_test_results )
498+ assert not match
495499
496500 finally :
497501 fto_path .write_text (original_code , "utf-8" )
@@ -630,7 +634,8 @@ def test_sort():
630634 out_str = """codeflash stdout : BubbleSorter.sorter_classmethod() called
631635"""
632636 assert test_results [0 ].stdout == out_str
633- assert compare_test_results (test_results , test_results )
637+ match , _ = compare_test_results (test_results , test_results )
638+ assert match
634639
635640 assert test_results [1 ].id .function_getting_tested == "BubbleSorter.sorter_classmethod"
636641 assert test_results [1 ].id .iteration_id == "4_0"
@@ -655,7 +660,8 @@ def test_sort():
655660 testing_time = 0.1 ,
656661 )
657662
658- assert compare_test_results (test_results , results2 )
663+ match , _ = compare_test_results (test_results , results2 )
664+ assert match
659665
660666 finally :
661667 fto_path .write_text (original_code , "utf-8" )
@@ -794,7 +800,8 @@ def test_sort():
794800 out_str = """codeflash stdout : BubbleSorter.sorter_staticmethod() called
795801"""
796802 assert test_results [0 ].stdout == out_str
797- assert compare_test_results (test_results , test_results )
803+ match , _ = compare_test_results (test_results , test_results )
804+ assert match
798805
799806 assert test_results [1 ].id .function_getting_tested == "BubbleSorter.sorter_staticmethod"
800807 assert test_results [1 ].id .iteration_id == "4_0"
@@ -819,7 +826,8 @@ def test_sort():
819826 testing_time = 0.1 ,
820827 )
821828
822- assert compare_test_results (test_results , results2 )
829+ match , _ = compare_test_results (test_results , results2 )
830+ assert match
823831
824832 finally :
825833 fto_path .write_text (original_code , "utf-8" )
0 commit comments