File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ def isolate_logging():
48
48
def pytest_ignore_collect (collection_path , config ):
49
49
"""Ignore async test files on Python 3.7 since Starlette requires Python 3.8+"""
50
50
if sys .version_info >= (3 , 8 ):
51
- return None # Let pytest decide (default behavior)
51
+ return None
52
52
53
53
# Skip test_aio.py entirely on Python 3.7
54
54
if collection_path .name == "test_aio.py" :
55
55
return True
56
56
57
- return None # Let pytest decide (default behavior)
57
+ return None
58
58
59
59
60
60
# Safe to remove when we drop Python 3.7 support
@@ -86,16 +86,8 @@ def pytest_collection_modifyitems(config, items):
86
86
skip_test = True
87
87
break
88
88
89
- # Check test file and function names for async-related test files
90
- test_file = str (item .fspath )
91
- test_name = item .name
92
-
93
- # Skip tests in files with async-related keywords
94
- if any (keyword in test_file .lower () for keyword in async_keywords ):
95
- skip_test = True
96
-
97
89
# Skip tests that explicitly test async functionality
98
- if any (keyword in test_name .lower () for keyword in async_keywords ):
90
+ if any (keyword in item . name .lower () for keyword in async_keywords ):
99
91
skip_test = True
100
92
101
93
if skip_test :
You can’t perform that action at this time.
0 commit comments