summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio/test_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
-rw-r--r--Lib/test/test_asyncio/test_events.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index 01f616ab5b..708fb3273d 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -41,9 +41,11 @@ def tearDownModule():
asyncio.set_event_loop_policy(None)
-def osx_tiger():
+def broken_unix_getsockname():
"""Return True if the platform is Mac OS 10.4 or older."""
- if sys.platform != 'darwin':
+ if sys.platform.startswith("aix"):
+ return True
+ elif sys.platform != 'darwin':
return False
version = platform.mac_ver()[0]
version = tuple(map(int, version.split('.')))
@@ -617,7 +619,7 @@ class EventLoopTestsMixin:
def test_create_unix_connection(self):
# Issue #20682: On Mac OS X Tiger, getsockname() returns a
# zero-length address for UNIX socket.
- check_sockname = not osx_tiger()
+ check_sockname = not broken_unix_getsockname()
with test_utils.run_test_unix_server() as httpd:
conn_fut = self.loop.create_unix_connection(
@@ -748,7 +750,7 @@ class EventLoopTestsMixin:
def test_create_ssl_unix_connection(self):
# Issue #20682: On Mac OS X Tiger, getsockname() returns a
# zero-length address for UNIX socket.
- check_sockname = not osx_tiger()
+ check_sockname = not broken_unix_getsockname()
with test_utils.run_test_unix_server(use_ssl=True) as httpd:
create_connection = functools.partial(