bpo-45668: Fix PGO tests without test extensions (GH-29315)

This commit is contained in:
Christian Heimes 2021-11-01 12:14:53 +02:00 committed by GitHub
parent 762a4dc936
commit e73283a20f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 60 additions and 28 deletions

View file

@ -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