mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-45668: Fix PGO tests without test extensions (GH-29315)
This commit is contained in:
parent
762a4dc936
commit
e73283a20f
13 changed files with 60 additions and 28 deletions
|
@ -31,7 +31,10 @@ from datetime import timezone
|
|||
from datetime import date, datetime
|
||||
import time as _time
|
||||
|
||||
import _testcapi
|
||||
try:
|
||||
import _testcapi
|
||||
except ImportError:
|
||||
_testcapi = None
|
||||
|
||||
# Needed by test_datetime
|
||||
import _strptime
|
||||
|
@ -5918,6 +5921,7 @@ class IranTest(ZoneInfoTest):
|
|||
zonename = 'Asia/Tehran'
|
||||
|
||||
|
||||
@unittest.skipIf(_testcapi is None, 'need _testcapi module')
|
||||
class CapiTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
# Since the C API is not present in the _Pure tests, skip all tests
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue