bpo-43892: Make match patterns explicit in the AST (GH-25585)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
This commit is contained in:
Nick Coghlan 2021-04-29 15:58:44 +10:00 committed by GitHub
parent e52ab42ced
commit 1e7b858575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 3460 additions and 1377 deletions

View file

@ -2857,6 +2857,22 @@ class TestPatma(unittest.TestCase):
self.assertIs(y, None)
self.assertIs(z, None)
@no_perf
def test_patma_283(self):
self.assert_syntax_error("""
match ...:
case {0+0: _}:
pass
""")
@no_perf
def test_patma_284(self):
self.assert_syntax_error("""
match ...:
case {f"": _}:
pass
""")
class PerfPatma(TestPatma):