we-like-parsers / cpython

Here we work on integrating pegen into CPython; use branch 'pegen'
https://github.com/gvanrossum/pegen
Other
1 stars 0 forks source link

f-string parser: Check what's going on what misformed uncode #160

Closed pablogsal closed 1 year ago

pablogsal commented 3 years ago

We are failing to raise syntax error for misformed unicode character names so something is going on with the tokenizer. Some example tests that fail is test_misformed_unicode_character_name:

FAIL: test_misformed_unicode_character_name (test.test_fstring.TestCase) (str="f'\\N'")\n----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pablogsal/github/python/f-string-grammar/Lib/test/test_fstring.py", line 32, in assertAllRaise
    with self.assertRaisesRegex(exception_type, regex):
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: SyntaxError not raised
lysnikolaou commented 1 year ago

@isidentical @pablogsal I closed this, since this appears to be fixed. Obviously feel free to reopen in case that's not correct.