@@ -41,9 +41,11 @@ def tearDownModule():
4141 asyncio .set_event_loop_policy (None )
4242
4343
44- def osx_tiger ():
44+ def broken_unix_getsockname ():
4545 """Return True if the platform is Mac OS 10.4 or older."""
46- if sys .platform != 'darwin' :
46+ if sys .platform .startswith ("aix" ):
47+ return True
48+ elif sys .platform != 'darwin' :
4749 return False
4850 version = platform .mac_ver ()[0 ]
4951 version = tuple (map (int , version .split ('.' )))
@@ -617,7 +619,7 @@ def test_create_connection(self):
617619 def test_create_unix_connection (self ):
618620 # Issue #20682: On Mac OS X Tiger, getsockname() returns a
619621 # zero-length address for UNIX socket.
620- check_sockname = not osx_tiger ()
622+ check_sockname = not broken_unix_getsockname ()
621623
622624 with test_utils .run_test_unix_server () as httpd :
623625 conn_fut = self .loop .create_unix_connection (
@@ -748,7 +750,7 @@ def test_create_ssl_connection(self):
748750 def test_create_ssl_unix_connection (self ):
749751 # Issue #20682: On Mac OS X Tiger, getsockname() returns a
750752 # zero-length address for UNIX socket.
751- check_sockname = not osx_tiger ()
753+ check_sockname = not broken_unix_getsockname ()
752754
753755 with test_utils .run_test_unix_server (use_ssl = True ) as httpd :
754756 create_connection = functools .partial (
0 commit comments