Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba8af84

Browse files
authored
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!
1 parentecd8664 commitba8af84

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎Lib/test/test_int.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
exceptImportError:
1313
_pylong=None
1414

15+
try:
16+
import_decimal
17+
exceptImportError:
18+
_decimal=None
19+
1520
L= [
1621
('0',0),
1722
('1',1),
@@ -920,6 +925,7 @@ def test_pylong_roundtrip(self):
920925
bits<<=1
921926

922927
@support.requires_resource('cpu')
928+
@unittest.skipUnless(_decimal,"C _decimal module required")
923929
deftest_pylong_roundtrip_huge(self):
924930
# k blocks of 1234567890
925931
k=1_000_000# so 10 million digits in all
@@ -931,6 +937,7 @@ def test_pylong_roundtrip_huge(self):
931937

932938
@support.requires_resource('cpu')
933939
@unittest.skipUnless(_pylong,"_pylong module required")
940+
@unittest.skipUnless(_decimal,"C _decimal module required")
934941
deftest_whitebox_dec_str_to_int_inner_failsafe(self):
935942
# While I believe the number of GUARD digits in this function is
936943
# always enough so that no more than one correction step is ever
@@ -950,6 +957,7 @@ def test_whitebox_dec_str_to_int_inner_failsafe(self):
950957
_pylong._spread.update(orig_spread)
951958

952959
@unittest.skipUnless(_pylong,"pylong module required")
960+
@unittest.skipUnless(_decimal,"C _decimal module required")
953961
deftest_whitebox_dec_str_to_int_inner_monster(self):
954962
# I don't think anyone has enough RAM to build a string long enough
955963
# for this function to complain. So lie about the string length.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp