From 5de85a17029356084b96db63e04d9eb150efd9c0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 4 Apr 2017 10:35:15 +0200 Subject: bpo-29972: Skip tests known to fail on AIX (#979) * bpo-29972: Fix test_eintr on AIX On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects 200 ms or longer. * bpo-29972: Skip some inet_pton() tests on AIX Skip some inet_pton() tests of test_socket on AIX. inet_pton() on AIX is less strict than on Linux and doesn't reject some invalid IP addresses. The unit tests test more the libc than Python itself. * bpo-29972: Skip tests known to fail on AIX * test_locale.test_strcoll_with_diacritic() * test_locale.test_strxfrm_with_diacritic() * test_strptime.test_week_of_year_and_day_of_week_calculation() * test_tools.test_POT_Creation_Date() --- Lib/test/test_socket.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Lib/test/test_socket.py') diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 7cc2e57b0d..2155d630dd 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1026,7 +1026,9 @@ class GeneralModuleTests(unittest.TestCase): self.assertEqual(b'\xaa\xaa\xaa\xaa', f('170.170.170.170')) self.assertEqual(b'\x01\x02\x03\x04', f('1.2.3.4')) self.assertEqual(b'\xff\xff\xff\xff', f('255.255.255.255')) - assertInvalid(f, '0.0.0.') + # bpo-29972: inet_pton() doesn't fail on AIX + if not sys.platform.startswith('aix'): + assertInvalid(f, '0.0.0.') assertInvalid(f, '300.0.0.0') assertInvalid(f, 'a.0.0.0') assertInvalid(f, '1.2.3.4.5') @@ -1081,10 +1083,12 @@ class GeneralModuleTests(unittest.TestCase): assertInvalid('::0::') assertInvalid('1::abc::') assertInvalid('1::abc::def') - assertInvalid('1:2:3:4:5:6:') assertInvalid('1:2:3:4:5:6') - assertInvalid('1:2:3:4:5:6:7:8:') assertInvalid('1:2:3:4:5:6:7:8:0') + # bpo-29972: inet_pton() doesn't fail on AIX + if not sys.platform.startswith('aix'): + assertInvalid('1:2:3:4:5:6:') + assertInvalid('1:2:3:4:5:6:7:8:') self.assertEqual(b'\x00' * 12 + b'\xfe\x2a\x17\x40', f('::254.42.23.64') -- cgit v1.2.1