Skip to content

Commit

Permalink
Skip test on s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
markshannon committed Jul 31, 2023
1 parent 7e6a521 commit 0e8c992
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"ALWAYS_EQ", "NEVER_EQ", "LARGEST", "SMALLEST",
"LOOPBACK_TIMEOUT", "INTERNET_TIMEOUT", "SHORT_TIMEOUT", "LONG_TIMEOUT",
"Py_DEBUG", "EXCEEDS_RECURSION_LIMIT", "C_RECURSION_LIMIT",
"skip_on_s390x",
]


Expand Down Expand Up @@ -2463,3 +2464,7 @@ def adjust_int_max_str_digits(max_digits):

# The default C recursion limit (from Include/cpython/pystate.h).
C_RECURSION_LIMIT = 1500

#Windows doesn't have os.uname() but it doesn't support s390x.
skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == 's390x',
'skipped on s390x')
3 changes: 2 additions & 1 deletion Lib/test/test_call.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from test.support import cpython_only, requires_limited_api
from test.support import cpython_only, requires_limited_api, skip_on_s390x
try:
import _testcapi
except ImportError:
Expand Down Expand Up @@ -918,6 +918,7 @@ def test_multiple_values(self):
@cpython_only
class TestRecursion(unittest.TestCase):

@skip_on_s390x
def test_super_deep(self):

def recurse(n):
Expand Down
7 changes: 2 additions & 5 deletions Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pickle
import random
import sys
from test.support import bigmemtest, _1G, _4G
from test.support import bigmemtest, _1G, _4G, skip_on_s390x


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

# condition.

class VersionTestCase(unittest.TestCase):

Expand Down

0 comments on commit 0e8c992

Please sign in to comment.