Skip to content

Commit 0e8c992

Browse files
committed
Skip test on s390x
1 parent 7e6a521 commit 0e8c992

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Lib/test/support/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"ALWAYS_EQ", "NEVER_EQ", "LARGEST", "SMALLEST",
6666
"LOOPBACK_TIMEOUT", "INTERNET_TIMEOUT", "SHORT_TIMEOUT", "LONG_TIMEOUT",
6767
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "C_RECURSION_LIMIT",
68+
"skip_on_s390x",
6869
]
6970

7071

@@ -2463,3 +2464,7 @@ def adjust_int_max_str_digits(max_digits):
24632464

24642465
# The default C recursion limit (from Include/cpython/pystate.h).
24652466
C_RECURSION_LIMIT = 1500
2467+
2468+
#Windows doesn't have os.uname() but it doesn't support s390x.
2469+
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x',
2470+
'skipped on s390x')

Lib/test/test_call.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import unittest
2-
from test.support import cpython_only, requires_limited_api
2+
from test.support import cpython_only, requires_limited_api, skip_on_s390x
33
try:
44
import _testcapi
55
except ImportError:
@@ -918,6 +918,7 @@ def test_multiple_values(self):
918918
@cpython_only
919919
class TestRecursion(unittest.TestCase):
920920

921+
@skip_on_s390x
921922
def test_super_deep(self):
922923

923924
def recurse(n):

Lib/test/test_zlib.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pickle
88
import random
99
import sys
10-
from test.support import bigmemtest, _1G, _4G
10+
from test.support import bigmemtest, _1G, _4G, skip_on_s390x
1111

1212

1313
zlib = import_helper.import_module('zlib')
@@ -44,10 +44,7 @@
4444
# zlib.decompress(func1(data)) == zlib.decompress(func2(data)) == data
4545
#
4646
# Make the assumption that s390x always has an accelerator to simplify the skip
47-
# condition. Windows doesn't have os.uname() but it doesn't support s390x.
48-
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x',
49-
'skipped on s390x')
50-
47+
# condition.
5148

5249
class VersionTestCase(unittest.TestCase):
5350

0 commit comments

Comments
 (0)