@@ -125,33 +125,73 @@ def skip(rel_id):
125
125
"test_tasks.py::RunCoroutineThreadsafeTests::"
126
126
"test_run_coroutine_threadsafe_with_timeout"
127
127
)
128
+ if sys .platform == "win32" :
129
+ xfail ("test_windows_events.py::ProactorLoopCtrlC::test_ctrl_c" )
128
130
129
- # These fail with ConnectionResetError on Pythons <= 3.7.x
130
- # for some unknown x. ( 3.7.1 fails, 3.7.5 and 3.7.6 pass;
131
- # older 3.6.x also affected)
132
- if sys .platform != "win32" and sys . version_info < ( 3 , 8 ) :
131
+ # The CPython SSL tests ignored here fail with
132
+ # ConnectionResetError on Pythons <= 3.7.x for some unknown x.
133
+ # (3.7.1 fails, 3.7.5 and 3.7.6 pass; older 3.6.x also affected)
134
+ if sys .platform != "win32" :
133
135
import selectors
134
136
137
+ xfail_per_eventloop = []
138
+ if sys .implementation .name == "pypy" :
139
+ # pypy uses a different spelling of the certificate
140
+ # failure error message which causes this test to spuriously fail
141
+ if sys .version_info >= (3 , 7 ):
142
+ xfail_per_eventloop += [
143
+ "test_create_server_ssl_match_failed"
144
+ ]
145
+ else :
146
+ if sys .version_info < (3 , 8 ):
147
+ xfail_per_eventloop += [
148
+ "test_create_ssl_connection" ,
149
+ "test_create_ssl_unix_connection"
150
+ ]
151
+ if sys .version_info < (3 , 7 ):
152
+ xfail_per_eventloop += [
153
+ "test_legacy_create_ssl_connection" ,
154
+ "test_legacy_create_ssl_unix_connection" ,
155
+ ]
156
+
135
157
kinds = ("Select" ,)
136
158
for candidate in ("Kqueue" , "Epoll" , "Poll" ):
137
159
if hasattr (selectors , candidate + "Selector" ):
138
160
kinds += (candidate .replace ("Epoll" , "EPoll" ),)
139
161
for kind in kinds :
140
- tests = (
141
- "test_create_ssl_connection" , "test_create_ssl_unix_connection"
142
- )
162
+ for test in xfail_per_eventloop :
163
+ xfail ("test_events.py::{}EventLoopTests::{}" .format (kind , test ))
164
+
165
+ if sys .implementation .name != "pypy" :
143
166
if sys .version_info < (3 , 7 ):
144
- tests += (
145
- "test_legacy_create_ssl_connection" ,
146
- "test_legacy_create_ssl_unix_connection" ,
147
- )
148
167
stream_suite = "StreamReaderTests"
149
168
else :
150
169
stream_suite = "StreamTests"
151
- for test in tests :
152
- xfail ("test_events.py::{}EventLoopTests::{}" .format (kind , test ))
153
170
for which in ("open_connection" , "open_unix_connection" ):
154
171
xfail (
155
172
"test_streams.py::{}::test_{}_no_loop_ssl"
156
173
.format (stream_suite , which )
157
174
)
175
+
176
+ if sys .implementation .name == "pypy" and sys .version_info >= (3 , 7 ):
177
+ # This fails due to a trivial difference in how pypy handles IPv6
178
+ # addresses
179
+ xfail (
180
+ "test_base_events.py::BaseEventLoopWithSelectorTests::"
181
+ "test_create_connection_ipv6_scope"
182
+ )
183
+ # This test depends on the C implementation of asyncio.Future, and
184
+ # unlike most such tests it is not configured to be skipped if
185
+ # the C implementation is not available
186
+ xfail (
187
+ "test_futures.py::CFutureInheritanceTests::"
188
+ "test_inherit_without_calling_super_init"
189
+ )
190
+ # These tests assume CPython-style immediate finalization of
191
+ # objects when they become unreferenced
192
+ for test in (
193
+ "test_create_connection_memory_leak" ,
194
+ "test_handshake_timeout" ,
195
+ "test_start_tls_client_reg_proto_1" ,
196
+ ):
197
+ xfail ("test_sslproto.py::SelectorStartTLSTests::{}" .format (test ))
0 commit comments