File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -207,10 +207,10 @@ def test_create_server_4(self):
207
207
with sock :
208
208
addr = sock .getsockname ()
209
209
210
- with self .assertRaisesRegex (OSError ,
211
- "error while attempting.*\('127.*: "
212
- "address already in use" ):
210
+ re = r"(error while attempting.*\('127.*: address already in use)"
211
+ re += r"|(error while attempting to bind.*only one usage)" # win
213
212
213
+ with self .assertRaisesRegex (OSError , re ):
214
214
self .loop .run_until_complete (
215
215
self .loop .create_server (object , * addr ))
216
216
@@ -405,7 +405,10 @@ async def client():
405
405
loop = self .loop )
406
406
407
407
async def runner ():
408
- with self .assertRaisesRegex (OSError , 'Bad file' ):
408
+ re = r"(Bad file)"
409
+ re += r"|(is not a socket)" # win
410
+
411
+ with self .assertRaisesRegex (OSError , re ):
409
412
await client ()
410
413
411
414
self .loop .run_until_complete (runner ())
You can’t perform that action at this time.
0 commit comments