File tree Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -115,40 +115,9 @@ def test_add_decorator_imports_helper_in_nested_class():
115115def sort_classmethod(x):
116116 y = WrapperClass.BubbleSortClass()
117117 return y.sorter(x)
118- """
119- expected_code_helper = """from line_profiler import profile as codeflash_line_profile
120-
121-
122- def hi():
123- pass
124-
125-
126- class WrapperClass:
127- def __init__(self):
128- pass
129-
130- class BubbleSortClass:
131- def __init__(self):
132- pass
133-
134- @codeflash_line_profile
135- def sorter(self, arr):
136- def inner_helper(arr, j):
137- return arr[j] > arr[j + 1]
138-
139- for i in range(len(arr)):
140- for j in range(len(arr) - 1):
141- if arr[j] > arr[j + 1]:
142- temp = arr[j]
143- arr[j] = arr[j + 1]
144- arr[j + 1] = temp
145- return arr
146-
147- def helper(self, arr, j):
148- return arr[j] > arr[j + 1]
149118"""
150119 assert code_path .read_text ("utf-8" ) == expected_code_main
151- assert code_context .helper_functions [ 0 ]. file_path . read_text ( "utf-8" ) == expected_code_helper
120+ assert code_context .helper_functions . __len__ ( ) == 0
152121 finally :
153122 func_optimizer .write_code_and_helpers (
154123 func_optimizer .function_to_optimize_source_code , original_helper_code , func_optimizer .function_to_optimize .file_path
You can’t perform that action at this time.
0 commit comments