Skip to content

bpo-29972: Skip tests known to fail on AIX #979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Lib/test/eintrdata/eintr_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,12 @@ def test_sigtimedwait(self):
t0 = time.monotonic()
signal.sigtimedwait([signal.SIGUSR1], self.sleep_time)
dt = time.monotonic() - t0
self.assertGreaterEqual(dt, self.sleep_time)

if sys.platform.startswith('aix'):
# On AIX, sigtimedwait(0.2) sleeps 199.8 ms
self.assertGreaterEqual(dt, self.sleep_time * 0.9)
else:
self.assertGreaterEqual(dt, self.sleep_time)

@unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
'need signal.sigwaitinfo()')
Expand Down
4 changes: 4 additions & 0 deletions Lib/test/test_locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,13 @@ def setUp(self):
raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
BaseLocalizedTest.setUp(self)

@unittest.skipIf(sys.platform.startswith('aix'),
'bpo-29972: broken test on AIX')
def test_strcoll_with_diacritic(self):
self.assertLess(locale.strcoll('à', 'b'), 0)

@unittest.skipIf(sys.platform.startswith('aix'),
'bpo-29972: broken test on AIX')
def test_strxfrm_with_diacritic(self):
self.assertLess(locale.strxfrm('à'), locale.strxfrm('b'))

Expand Down
10 changes: 7 additions & 3 deletions Lib/test/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,9 @@ def testIPv4toString(self):
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')
Expand Down Expand Up @@ -1081,10 +1083,12 @@ def testIPv6toString(self):
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')
Expand Down
3 changes: 3 additions & 0 deletions Lib/test/test_strptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import locale
import re
import os
import sys
from test import support
from datetime import date as datetime_date

Expand Down Expand Up @@ -482,6 +483,8 @@ def test_day_of_week_calculation(self):
_ymd_excluded = ()
_formats_excluded = ()

@unittest.skipIf(sys.platform.startswith('aix'),
'bpo-29972: broken test on AIX')
def test_week_of_year_and_day_of_week_calculation(self):
# Should be able to infer date if given year, week of year (%U or %W)
# and day of the week
Expand Down
4 changes: 3 additions & 1 deletion Lib/test/test_tools/test_i18n.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests to cover the Tools/i18n package"""

import os
import sys
import unittest

from test.support.script_helper import assert_python_ok
Expand Down Expand Up @@ -53,7 +54,8 @@ def test_header(self):

#"Plural-Forms" is optional


@unittest.skipIf(sys.platform.startswith('aix'),
'bpo-29972: broken test on AIX')
def test_POT_Creation_Date(self):
""" Match the date format from xgettext for POT-Creation-Date """
from datetime import datetime
Expand Down