Skip to content

Commit 61aade1

Browse files
committed
Update test_async_run_and_parse_tests.py
1 parent febf2b6 commit 61aade1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_async_run_and_parse_tests.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
from argparse import Namespace
55
from pathlib import Path
66

7-
from codeflash.code_utils.instrument_existing_tests import instrument_source_module_with_async_decorators
87
from codeflash.discovery.functions_to_optimize import FunctionToOptimize
98
from codeflash.models.models import FunctionParent, TestFile, TestFiles, TestingMode, TestType
109
from codeflash.optimization.optimizer import Optimizer
1110
from codeflash.verification.instrument_codeflash_capture import instrument_codeflash_capture
12-
11+
from codeflash.code_utils.instrument_existing_tests import instrument_source_module_with_async_decorators, inject_profiling_into_existing_test
1312

1413
def test_async_bubble_sort_behavior_results() -> None:
1514
test_code = """import asyncio
@@ -117,13 +116,12 @@ async def test_async_sort():
117116
assert expected_stdout == results_list[0].stdout
118117

119118

120-
if len(results_list) > 1:
121-
assert results_list[1].id.function_getting_tested == "async_sorter"
122-
assert results_list[1].id.test_function_name == "test_async_sort"
123-
assert results_list[1].did_pass
119+
assert results_list[1].id.function_getting_tested == "async_sorter"
120+
assert results_list[1].id.test_function_name == "test_async_sort"
121+
assert results_list[1].did_pass
124122

125-
expected_stdout2 = "codeflash stdout: Async sorting list\nresult: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0]\n"
126-
assert expected_stdout2 == results_list[1].stdout
123+
expected_stdout2 = "codeflash stdout: Async sorting list\nresult: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0]\n"
124+
assert expected_stdout2 == results_list[1].stdout
127125

128126
finally:
129127
# Restore original code

0 commit comments

Comments
 (0)