mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
gh-107909: Test explicit object
base in PEP695 generic classes (#108001)
This commit is contained in:
parent
a8d440b383
commit
b61f5995ae
1 changed files with 4 additions and 0 deletions
|
@ -148,6 +148,10 @@ class TypeParamsInvalidTest(unittest.TestCase):
|
|||
check_syntax_error(self, "def f[T: [(x := 3) for _ in range(2)]](): pass")
|
||||
check_syntax_error(self, "type T = [(x := 3) for _ in range(2)]")
|
||||
|
||||
def test_incorrect_mro_explicit_object(self):
|
||||
with self.assertRaisesRegex(TypeError, r"\(MRO\) for bases object, Generic"):
|
||||
class My[X](object): ...
|
||||
|
||||
|
||||
class TypeParamsNonlocalTest(unittest.TestCase):
|
||||
def test_nonlocal_disallowed_01(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue