File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -332,18 +332,20 @@ def find_leftover_instrumented_test_files(test_root: Path) -> list[Path]:
332
332
"""Search for all paths within the test_root that match the following patterns.
333
333
334
334
- 'test.*__perf_test_{0,1}.py'
335
- - 'test_.*__unit_ {0,1}.py'
335
+ - 'test_.*__unit_test_ {0,1}.py'
336
336
- 'test_.*__perfinstrumented.py'
337
337
- 'test_.*__perfonlyinstrumented.py'
338
338
Returns a list of matching file paths.
339
339
"""
340
340
import re
341
341
342
342
pattern = re .compile (
343
- r"^( test.*__perf_test_?\.py|test_.*__unit_ ?\.py|test_.*__perfinstrumented\.py|test_.*__perfonlyinstrumented\.py)$"
343
+ r"(?: test.*__perf_test_\d ?\.py|test_.*__unit_test_\d ?\.py|test_.*__perfinstrumented\.py|test_.*__perfonlyinstrumented\.py)$"
344
344
)
345
345
346
- return [file for file in test_root .rglob ("test_*.py" ) if pattern .match (file .name )]
346
+ return [
347
+ file_path for file_path in test_root .rglob ("*" ) if file_path .is_file () and pattern .match (file_path .name )
348
+ ]
347
349
348
350
def cleanup_temporary_paths (self ) -> None :
349
351
if self .current_function_optimizer :
You can’t perform that action at this time.
0 commit comments