@@ -124,71 +124,37 @@ def skip(rel_id):
124
124
"test_tasks.py::RunCoroutineThreadsafeTests::"
125
125
"test_run_coroutine_threadsafe_task_cancelled"
126
126
)
127
- xfail (
128
- "test_tasks.py::RunCoroutineThreadsafeTests::"
129
- "test_run_coroutine_threadsafe_with_timeout"
130
- )
127
+ if sys .version_info < (3 , 11 ):
128
+ xfail (
129
+ "test_tasks.py::RunCoroutineThreadsafeTests::"
130
+ "test_run_coroutine_threadsafe_with_timeout"
131
+ )
131
132
if sys .platform == "win32" :
132
133
xfail ("test_windows_events.py::ProactorLoopCtrlC::test_ctrl_c" )
133
134
134
- # The CPython SSL tests ignored here fail with
135
- # ConnectionResetError on Pythons <= 3.7.x for some unknown x.
136
- # (3.7.1 fails, 3.7.5 and 3.7.6 pass; older 3.6.x also affected)
137
- if sys .platform != "win32" :
138
- import selectors
139
-
140
- xfail_per_eventloop = []
141
- if sys .implementation .name == "pypy" :
142
- # pypy uses a different spelling of the certificate
143
- # failure error message which causes this test to spuriously fail
144
- xfail_per_eventloop += [
145
- "test_create_server_ssl_match_failed"
146
- ]
147
- else :
148
- if sys .version_info < (3 , 8 ):
149
- xfail_per_eventloop += [
150
- "test_create_ssl_connection" ,
151
- "test_create_ssl_unix_connection"
152
- ]
153
-
154
- kinds = ("Select" ,)
155
- for candidate in ("Kqueue" , "Epoll" , "Poll" ):
156
- if hasattr (selectors , candidate + "Selector" ):
157
- kinds += (candidate .replace ("Epoll" , "EPoll" ),)
158
- for kind in kinds :
159
- for test in xfail_per_eventloop :
160
- xfail ("test_events.py::{}EventLoopTests::{}" .format (kind , test ))
161
-
162
- if sys .implementation .name != "pypy" :
163
- stream_suite = "StreamTests"
164
- for which in ("open_connection" , "open_unix_connection" ):
165
- xfail (
166
- "test_streams.py::{}::test_{}_no_loop_ssl"
167
- .format (stream_suite , which )
168
- )
169
-
170
135
if sys .implementation .name == "pypy" :
171
- # This fails due to a trivial difference in how pypy handles IPv6
172
- # addresses
173
- xfail (
174
- "test_base_events.py::BaseEventLoopWithSelectorTests::"
175
- "test_create_connection_ipv6_scope"
176
- )
177
136
# This test depends on the C implementation of asyncio.Future, and
178
137
# unlike most such tests it is not configured to be skipped if
179
138
# the C implementation is not available
180
139
xfail (
181
140
"test_futures.py::CFutureInheritanceTests::"
182
141
"test_inherit_without_calling_super_init"
183
142
)
184
- # These tests assume CPython-style immediate finalization of
185
- # objects when they become unreferenced
186
- for test in (
187
- "test_create_connection_memory_leak" ,
188
- "test_handshake_timeout" ,
189
- "test_start_tls_client_reg_proto_1" ,
190
- ):
191
- xfail ("test_sslproto.py::SelectorStartTLSTests::{}" .format (test ))
143
+ if sys .version_info < (3 , 8 ):
144
+ # This fails due to a trivial difference in how pypy handles IPv6
145
+ # addresses
146
+ xfail (
147
+ "test_base_events.py::BaseEventLoopWithSelectorTests::"
148
+ "test_create_connection_ipv6_scope"
149
+ )
150
+ # These tests assume CPython-style immediate finalization of
151
+ # objects when they become unreferenced
152
+ for test in (
153
+ "test_create_connection_memory_leak" ,
154
+ "test_handshake_timeout" ,
155
+ "test_start_tls_client_reg_proto_1" ,
156
+ ):
157
+ xfail ("test_sslproto.py::SelectorStartTLSTests::{}" .format (test ))
192
158
193
159
if sys .version_info >= (3 , 11 ):
194
160
# This tries to use a mock ChildWatcher that does something unlikely.
@@ -198,12 +164,8 @@ def skip(rel_id):
198
164
"test_subprocess.py::GenericWatcherTests::"
199
165
"test_create_subprocess_fails_with_inactive_watcher"
200
166
)
167
+
168
+ if sys .version_info >= (3 , 9 ):
201
169
# This tries to create a new loop from within an existing one,
202
170
# which we don't support.
203
171
xfail ("test_locks.py::ConditionTests::test_ambiguous_loops" )
204
- # This asserts that a deprecation warning refers to the point of
205
- # the call, but our monkeypatching interposes another stack frame
206
- xfail (
207
- "test_events.py::TestCGetEventLoop::"
208
- "test_get_event_loop_returns_running_loop2"
209
- )
0 commit comments