]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/pyflakes/test/test_match.py
1 from sys
import version_info
3 from pyflakes
.test
.harness
import TestCase
, skipIf
6 @skipIf(version_info
< (3, 10), "Python >= 3.10 only")
7 class TestMatch(TestCase
):
8 def test_match_bindings(self
):
14 print(f'matched as {y}')
31 def test_match_pattern_matched_class(self
):
44 print(f'matched {y} {a} {z}')
47 def test_match_placeholder(self
):
55 def test_match_singleton(self
):
62 def test_match_or_pattern(self
):
69 def test_match_star(self
):
74 print(f'captured: {y}')
77 def test_match_double_star(self
):
79 x = {'foo': 'bar', 'baz': 'womp'}
81 case {'foo': k1, **rest}:
82 print(f'{k1=} {rest=}')
85 def test_defined_in_different_branches(self
):