We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c71d2da commit f628526Copy full SHA for f628526
codeflash/verification/hypothesis_testing.py
@@ -173,9 +173,9 @@ def generate_hypothesis_tests(
173
174
class TestFunctionRemover(ast.NodeTransformer):
175
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
+ if node.name.startswith("test_") and function_to_optimize.function_name in node.name:
+ return node
+ return None
179
180
modified_tree = TestFunctionRemover().visit(tree)
181
ast.fix_missing_locations(modified_tree)
0 commit comments