Skip to content

Commit 690ac3d

Browse files
updated regex in test
1 parent f3dd2fb commit 690ac3d

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
@@ -3404,7 +3404,8 @@ def test_class_pattern_not_type(self):
34043404
def test_class_or_union_not_specialform(self):
34053405
w = None
34063406
from typing import Literal
3407-
msg = 'called match pattern must be a class or a union'
3407+
name = type(Literal).__name__
3408+
msg = rf"called match pattern must be a class or a union \(got {name}\)"
34083409
with self.assertRaisesRegex(TypeError, msg):
34093410
match 1:
34103411
case Literal():

0 commit comments

Comments
 (0)