pypy/interpreter/pyparser/test/test_pytokenizer.py::test_f_string[format specifier: double braces]
source = 'f"{x:{{}}b"}\n'
expected = [(7, 'f"', 1, 0, 1, 2), (29, '{', 1, 2, 1, 3), (1, 'x', 1, 3, 1, 4), (14, ':', 1, 4, 1, 5), (8, '', 1, 5, 1, 5), (29, '{', 1, 5, 1, 6), ...]
@_parametrize("source, expected", _fstring_tests)
def test_f_string(source, expected):
lines = source.splitlines(True)
tks = tokenize(source)
assert tks[: len(expected)] == [
Token(
tk_type,
value,
lineno,
col_offset,
lines[end_lineno - 1],
end_lineno,
end_col_offset,
)
> for tk_type, value, lineno, col_offset, end_lineno, end_col_offset in expected
]
E assert [Token(FSTRIN...RACE, {), ...] == [Token(FSTRING...RACE, {), ...]
E At index 4 diff: Token(LBRACE, {) != Token(FSTRING_MIDDLE, )
E Use -v to get the full diff
interpreter/pyparser/test/test_pytokenizer.py:796: AssertionError
builder: own-linux-x86-64 build #10880+
test: pypy/interpreter/pyparser/test/test_pytokenizer.py::test_f_string[format specifier: double braces]