mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-71339: Use new assertion methods in test_import and test_importlib (GH-129052) (#129123)
(cherry picked from commit f7cc7d296c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
d2ec87f740
commit
a9bb0092d0
19 changed files with 68 additions and 64 deletions
|
|
@ -10,6 +10,7 @@
|
|||
from test.support import import_helper
|
||||
from test.support import is_apple_mobile
|
||||
from test.support import os_helper
|
||||
from test.support.testcase import ExtraAssertions
|
||||
import unittest
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
@ -80,7 +81,7 @@ def specialize_class(cls, kind, base=None, **kwargs):
|
|||
elif not isinstance(base, type):
|
||||
base = base[kind]
|
||||
name = '{}_{}'.format(kind, cls.__name__)
|
||||
bases = (cls, base)
|
||||
bases = (cls, base, ExtraAssertions)
|
||||
specialized = types.new_class(name, bases)
|
||||
specialized.__module__ = cls.__module__
|
||||
specialized._NAME = cls.__name__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue