diff options
author | Erlend E. Aasland <erlend@python.org> | 2024-04-03 15:11:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 15:11:36 +0200 |
commit | ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e (patch) | |
tree | 7fc58f8dcd7513427c7ea2ff9d7bad523be1118a /Lib/test/test_format.py | |
parent | 2ec6bb4111d2c03c1cac02b27c74beee7e5a2a05 (diff) | |
download | cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.gz cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.zip |
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r-- | Lib/test/test_format.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 6fa49dbc0b7..8cef621bd71 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -4,6 +4,7 @@ import sys import re import test.support as support import unittest +from test.support.import_helper import import_module maxsize = support.MAX_Py_ssize_t @@ -478,7 +479,8 @@ class FormatTest(unittest.TestCase): @support.cpython_only def test_precision_c_limits(self): - from _testcapi import INT_MAX + _testcapi = import_module("_testcapi") + INT_MAX = _testcapi.INT_MAX f = 1.2 with self.assertRaises(ValueError) as cm: |