Skip to content

Commit 00a7f11

Browse files
updated regex in test
1 parent d65100e commit 00a7f11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_patma.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3413,7 +3413,8 @@ def test_class_pattern_not_type(self):
34133413
def test_class_or_union_not_specialform(self):
34143414
w = None
34153415
from typing import Literal
3416-
msg = 'called match pattern must be a class or a union'
3416+
name = type(Literal).__name__
3417+
msg = rf"called match pattern must be a class or a union \(got {name}\)"
34173418
with self.assertRaisesRegex(TypeError, msg):
34183419
match 1:
34193420
case Literal():

0 commit comments

Comments
 (0)