We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f9aa38 commit eeef8cdCopy full SHA for eeef8cd
Lib/test/test_patma.py
@@ -3457,16 +3457,15 @@ def test_class_or_union_not_specialform(self):
3457
w = 0
3458
self.assertIsNone(w)
3459
3460
- def test_legacy_union_type(self):
+ def test_typing_union(self):
3461
from typing import Union
3462
IntOrStr = Union[int, str]
3463
name = type(IntOrStr).__name__
3464
msg = rf"called match pattern must be a class or typing.Union of classes \(got {name}\)"
3465
w = None
3466
- with self.assertRaisesRegex(TypeError, msg):
3467
- match 1:
3468
- case IntOrStr():
3469
- w = 0
+ match 1:
+ case IntOrStr():
+ w = 0
3470
3471
3472
def test_expanded_union_mirrors_isinstance_success(self):
0 commit comments