Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f-string parser: Update parentheses errors #158

Open
pablogsal opened this issue Oct 9, 2021 · 0 comments
Open

f-string parser: Update parentheses errors #158

pablogsal opened this issue Oct 9, 2021 · 0 comments

Comments

@pablogsal
Copy link

There is a bunch of tests that fail because the tokenizer error for mismatched parentheses is different. For example:

FAIL: test_compile_time_concat (test.test_fstring.TestCase) (str="f'{3' f'}'")\n----------------------------------------------------------------------
  File "<string>", line 1
    f'{3' f'}'
        ^
SyntaxError: expected '}'

During handling of the above exception, another exception occurred:

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: "f-string: expecting '}'" does not match "expected '}' (<string>, line 1)"

we need to update these tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant