Skip to content

Commit 0d83b86

Browse files
committed
gh-158446: Fix the new test_format test on 3.11
test_format.py does not import import_module on this branch. Import INT_MAX from _testcapi directly, as the neighboring test does.
1 parent 25797df commit 0d83b86

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/test/test_format.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@ def test_precision_c_limits(self):
492492
def test_precision_near_int_max(self):
493493
# gh-158446: Precisions just below INT_MAX are rejected before any
494494
# output buffer size is computed from them.
495-
_testcapi = import_module("_testcapi")
496-
INT_MAX = _testcapi.INT_MAX
495+
from _testcapi import INT_MAX
497496

498497
f = 1e300
499498
c = complex(f)

0 commit comments

Comments
 (0)