gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)

This commit is contained in:
Erlend E. Aasland 2024-04-03 15:11:36 +02:00 committed by GitHub
parent 2ec6bb4111
commit ea94b3b149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 255 additions and 123 deletions

View file

@ -12,6 +12,7 @@ import unittest
from test import support
from test.support import os_helper
from test.support.os_helper import TESTFN
from test.support.import_helper import import_module
ALL_CJKENCODINGS = [
# _codecs_cn
@ -212,7 +213,7 @@ class Test_IncrementalEncoder(unittest.TestCase):
@support.cpython_only
def test_subinterp(self):
# bpo-42846: Test a CJK codec in a subinterpreter
import _testcapi
_testcapi = import_module("_testcapi")
encoding = 'cp932'
text = "Python の開発は、1990 年ごろから開始されています。"
code = textwrap.dedent("""