diff options
author | Tim Peters <tim.peters@gmail.com> | 2024-05-19 01:54:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-19 01:54:23 (GMT) |
commit | ba8af848648d3eb51eb17395e12117007bae8606 (patch) | |
tree | af05b12cf7047f5b40c7521b36cbaf0cf80279a0 | |
parent | ecd8664f11298a1a4f7428363c55ad2904c9f279 (diff) | |
download | cpython-ba8af848648d3eb51eb17395e12117007bae8606.zip cpython-ba8af848648d3eb51eb17395e12117007bae8606.tar.gz cpython-ba8af848648d3eb51eb17395e12117007bae8606.tar.bz2 |
Try to repair oddball test bots timing out in test_int (#119166)
Various test bots (outside the ones GH normally runs) are timing out during test_int after ecd8664 (asymptotically faster str->int). Best guess is that they don't build the C _decimal module. So require that module in the most likely tests to time out then. Flying mostly blind, though!
-rw-r--r-- | Lib/test/test_int.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index 67c0801..caeccbe 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -12,6 +12,11 @@ try: except ImportError: _pylong = None +try: + import _decimal +except ImportError: + _decimal = None + L = [ ('0', 0), ('1', 1), @@ -920,6 +925,7 @@ class PyLongModuleTests(unittest.TestCase): bits <<= 1 @support.requires_resource('cpu') + @unittest.skipUnless(_decimal, "C _decimal module required") def test_pylong_roundtrip_huge(self): # k blocks of 1234567890 k = 1_000_000 # so 10 million digits in all @@ -931,6 +937,7 @@ class PyLongModuleTests(unittest.TestCase): @support.requires_resource('cpu') @unittest.skipUnless(_pylong, "_pylong module required") + @unittest.skipUnless(_decimal, "C _decimal module required") def test_whitebox_dec_str_to_int_inner_failsafe(self): # While I believe the number of GUARD digits in this function is # always enough so that no more than one correction step is ever @@ -950,6 +957,7 @@ class PyLongModuleTests(unittest.TestCase): _pylong._spread.update(orig_spread) @unittest.skipUnless(_pylong, "pylong module required") + @unittest.skipUnless(_decimal, "C _decimal module required") def test_whitebox_dec_str_to_int_inner_monster(self): # I don't think anyone has enough RAM to build a string long enough # for this function to complain. So lie about the string length. |