|
37 | 37 | from test import support
|
38 | 38 |
|
39 | 39 |
|
40 |
| -def osx_tiger(): |
| 40 | +def broken_unix_getsockname(): |
41 | 41 | """Return True if the platform is Mac OS 10.4 or older."""
|
42 |
| - if sys.platform != 'darwin': |
| 42 | + if sys.platform.startswith("aix"): |
| 43 | + return True |
| 44 | + elif sys.platform != 'darwin': |
43 | 45 | return False
|
44 | 46 | version = platform.mac_ver()[0]
|
45 | 47 | version = tuple(map(int, version.split('.')))
|
@@ -613,7 +615,7 @@ def test_create_connection(self):
|
613 | 615 | def test_create_unix_connection(self):
|
614 | 616 | # Issue #20682: On Mac OS X Tiger, getsockname() returns a
|
615 | 617 | # zero-length address for UNIX socket.
|
616 |
| - check_sockname = not osx_tiger() |
| 618 | + check_sockname = not broken_unix_getsockname() |
617 | 619 |
|
618 | 620 | with test_utils.run_test_unix_server() as httpd:
|
619 | 621 | conn_fut = self.loop.create_unix_connection(
|
@@ -744,7 +746,7 @@ def test_create_ssl_connection(self):
|
744 | 746 | def test_create_ssl_unix_connection(self):
|
745 | 747 | # Issue #20682: On Mac OS X Tiger, getsockname() returns a
|
746 | 748 | # zero-length address for UNIX socket.
|
747 |
| - check_sockname = not osx_tiger() |
| 749 | + check_sockname = not broken_unix_getsockname() |
748 | 750 |
|
749 | 751 | with test_utils.run_test_unix_server(use_ssl=True) as httpd:
|
750 | 752 | create_connection = functools.partial(
|
|
0 commit comments