diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2020-10-27 22:38:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 22:38:42 (GMT) |
commit | c4b58cea4771afc0ddfdb857b0fb5115b9f4bc9f (patch) | |
tree | 7e9bc77d8b2fe08c43a86b6805c14bdc31c20485 /Lib/test/test_syntax.py | |
parent | 8aee019d71b9ed44107bdc8a0c9c132059c0e1ef (diff) | |
download | cpython-c4b58cea4771afc0ddfdb857b0fb5115b9f4bc9f.zip cpython-c4b58cea4771afc0ddfdb857b0fb5115b9f4bc9f.tar.gz cpython-c4b58cea4771afc0ddfdb857b0fb5115b9f4bc9f.tar.bz2 |
[3.9] bpo-41659: Disallow curly brace directly after primary (GH-22996) (#23006)
(cherry picked from commit 15acc4eaba8519d7d5f2acaffde65446b44dcf79)
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r-- | Lib/test/test_syntax.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index d6583b9..b0527e6 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -802,6 +802,9 @@ class SyntaxTestCase(unittest.TestCase): else: self.fail("compile() did not raise SyntaxError") + def test_curly_brace_after_primary_raises_immediately(self): + self._check_error("f{", "invalid syntax", mode="single") + def test_assign_call(self): self._check_error("f() = 1", "assign") |