mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
This commit is contained in:
parent
2ec6bb4111
commit
ea94b3b149
57 changed files with 255 additions and 123 deletions
|
@ -1,5 +1,6 @@
|
|||
import unittest
|
||||
from test import support
|
||||
from test.support.import_helper import import_module
|
||||
|
||||
|
||||
class TestMROEntry(unittest.TestCase):
|
||||
|
@ -277,7 +278,9 @@ class TestClassGetitem(unittest.TestCase):
|
|||
class CAPITest(unittest.TestCase):
|
||||
|
||||
def test_c_class(self):
|
||||
from _testcapi import Generic, GenericAlias
|
||||
_testcapi = import_module("_testcapi")
|
||||
Generic = _testcapi.Generic
|
||||
GenericAlias = _testcapi.GenericAlias
|
||||
self.assertIsInstance(Generic.__class_getitem__(int), GenericAlias)
|
||||
|
||||
IntGeneric = Generic[int]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue