Skip to content

Commit f628526

Browse files
committed
Update hypothesis_testing.py
1 parent c71d2da commit f628526

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codeflash/verification/hypothesis_testing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ def generate_hypothesis_tests(
173173

174174
class TestFunctionRemover(ast.NodeTransformer):
175175
def visit_FunctionDef(self, node): # noqa: ANN001, ANN202
176-
if function_to_optimize.function_name not in node.name:
177-
return None
178-
return node
176+
if node.name.startswith("test_") and function_to_optimize.function_name in node.name:
177+
return node
178+
return None
179179

180180
modified_tree = TestFunctionRemover().visit(tree)
181181
ast.fix_missing_locations(modified_tree)

0 commit comments

Comments
 (0)