@@ -200,6 +200,8 @@ def app(environ, start_response):
200200if hasattr (socket , 'AF_UNIX' ):
201201
202202 class UnixHTTPServer (socketserver .UnixStreamServer , HTTPServer ):
203+ if sys .platform == 'win32' :
204+ allow_reuse_address = False
203205
204206 def server_bind (self ):
205207 socketserver .UnixStreamServer .server_bind (self )
@@ -243,6 +245,9 @@ def gen_unix_socket_path():
243245
244246 @contextlib .contextmanager
245247 def unix_socket_path ():
248+ if sys .platform == 'win32' :
249+ raise unittest .SkipTest ('AF_UNIX support for asyncio is not '
250+ 'implemented on Windows for now' )
246251 path = gen_unix_socket_path ()
247252 try :
248253 yield path
@@ -255,6 +260,9 @@ def unix_socket_path():
255260
256261 @contextlib .contextmanager
257262 def run_test_unix_server (* , use_ssl = False ):
263+ if sys .platform == 'win32' :
264+ raise unittest .SkipTest ('AF_UNIX support for asyncio is not '
265+ 'implemented on Windows for now' )
258266 with unix_socket_path () as path :
259267 yield from _run_test_server (address = path , use_ssl = use_ssl ,
260268 server_cls = SilentUnixWSGIServer ,
0 commit comments