8000 Add `type(Unpack)` to the test · python/cpython@12c761b · GitHub
[go: up one dir, main page]

Skip to content

Commit 12c761b

Browse files
committed
Add type(Unpack) to the test
1 parent e655315 commit 12c761b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_typing.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,10 @@ class C(TypeVarTuple): pass
10391039
class C(Ts): pass
10401040
with self.assertRaisesRegex(TypeError, r'Cannot subclass \*Ts'):
10411041
class C(*Ts): pass
1042+
with self.assertRaisesRegex(TypeError, CANNOT_SUBCLASS_TYPE):
1043+
class C(type(Unpack)): pass
1044+
with self.assertRaisesRegex(TypeError, CANNOT_SUBCLASS_TYPE):
1045+
class C(type(Unpack[Ts])): pass
10421046
with self.assertRaisesRegex(TypeError,
10431047
r'Cannot subclass typing\.Unpack'):
10441048
class C(Unpack): pass

0 commit comments

Comments
 (0)
0