diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-04-19 16:18:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 16:18:16 (GMT) |
commit | 1ef61cf71a218c71860ff6aecf0fd51edb8b65dc (patch) | |
tree | d0c4995cac9cb660b66498419d528254f26baf54 /Lib/test/test_exceptions.py | |
parent | a6b07b5a345f7f54ee9f6d75e81d2fb55971b35c (diff) | |
download | cpython-1ef61cf71a218c71860ff6aecf0fd51edb8b65dc.zip cpython-1ef61cf71a218c71860ff6aecf0fd51edb8b65dc.tar.gz cpython-1ef61cf71a218c71860ff6aecf0fd51edb8b65dc.tar.bz2 |
gh-102856: Initial implementation of PEP 701 (#102855)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 684e888..4ef7dec 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -155,6 +155,7 @@ class ExceptionTests(unittest.TestCase): ckmsg(s, "'continue' not properly in loop") ckmsg("continue\n", "'continue' not properly in loop") + ckmsg("f'{6 0}'", "invalid syntax. Perhaps you forgot a comma?") def testSyntaxErrorMissingParens(self): def ckmsg(src, msg, exception=SyntaxError): @@ -227,7 +228,7 @@ class ExceptionTests(unittest.TestCase): check('Python = "\u1e54\xfd\u0163\u0125\xf2\xf1" +', 1, 20) check(b'# -*- coding: cp1251 -*-\nPython = "\xcf\xb3\xf2\xee\xed" +', 2, 19, encoding='cp1251') - check(b'Python = "\xcf\xb3\xf2\xee\xed" +', 1, 18) + check(b'Python = "\xcf\xb3\xf2\xee\xed" +', 1, 10) check('x = "a', 1, 5) check('lambda x: x = 2', 1, 1) check('f{a + b + c}', 1, 2) |