8000 one more · python/cpython@d916974 · GitHub
[go: up one dir, main page]

Skip to content

Commit d916974

Browse files
committed
one more
1 parent 6ab8b1e commit d916974

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_type_params.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,10 @@ class ClassA[T](Generic[T]): ...
240240
exec(code, {})
241241

242242
def test_traditional_02(self):
243-
# This does not generate a runtime error, but it should be
244-
# flagged as an error by type checkers.
245243
from typing import TypeVar
246244
S = TypeVar("S")
247-
class ClassA[T](dict[T, S]): ...
245+
with self.assertRaises(TypeError):
246+
class ClassA[T](dict[T, S]): ...
248247

249248
def test_traditional_03(self):
250249
# This does not generate a runtime error, but it should be

0 commit comments

Comments
 (0)
0