lib-python/3/test/test_fstring.py::unmodified
== PyPy 3.12.13 (e99dc7a98783, Jul 10 2026, 04:08:29) [PyPy 8.0.0-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
== Linux-6.1.0-22-amd64-x86_64-with-glibc2.17 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_1730039æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network
Using random seed: 1300544694
0:00:00 load avg: 0.73 Run 1 test sequentially in a single process
0:00:00 load avg: 0.73 [1/1] test_fstring
test__format__lookup (test.test_fstring.TestCase.test__format__lookup) ... ok
test_arguments (test.test_fstring.TestCase.test_arguments) ... ok
test_assignment (test.test_fstring.TestCase.test_assignment) ... ok
test_ast (test.test_fstring.TestCase.test_ast) ... ok
test_ast_compile_time_concat (test.test_fstring.TestCase.test_ast_compile_time_concat) ... ok
test_ast_fstring_empty_format_spec (test.test_fstring.TestCase.test_ast_fstring_empty_format_spec) ... ok
test_ast_line_numbers (test.test_fstring.TestCase.test_ast_line_numbers) ... ok
test_ast_line_numbers_duplicate_expression (test.test_fstring.TestCase.test_ast_line_numbers_duplicate_expression) ... ok
test_ast_line_numbers_multiline_fstring (test.test_fstring.TestCase.test_ast_line_numbers_multiline_fstring) ... ok
test_ast_line_numbers_multiple_formattedvalues (test.test_fstring.TestCase.test_ast_line_numbers_multiple_formattedvalues) ... ok
test_ast_line_numbers_nested (test.test_fstring.TestCase.test_ast_line_numbers_nested) ... ok
test_ast_line_numbers_with_parentheses (test.test_fstring.TestCase.test_ast_line_numbers_with_parentheses) ... ok
test_ast_numbers_fstring_with_formatting (test.test_fstring.TestCase.test_ast_numbers_fstring_with_formatting) ... ok
test_backslash_char (test.test_fstring.TestCase.test_backslash_char) ... ok
test_backslashes_in_expression_part (test.test_fstring.TestCase.test_backslashes_in_expression_part) ... ok
test_backslashes_in_string_part (test.test_fstring.TestCase.test_backslashes_in_string_part) ... ok
test_call (test.test_fstring.TestCase.test_call) ... ok
test_closure (test.test_fstring.TestCase.test_closure) ... ok
test_comments (test.test_fstring.TestCase.test_comments) ...
test_comments (test.test_fstring.TestCase.test_comments) (str="f'{)#}'") ... FAIL
test_compile_time_concat (test.test_fstring.TestCase.test_compile_time_concat) ... ok
test_compile_time_concat_errors (test.test_fstring.TestCase.test_compile_time_concat_errors) ... ok
test_conversions (test.test_fstring.TestCase.test_conversions) ...
test_conversions (test.test_fstring.TestCase.test_conversions) (str="f'{3! s}'") ... FAIL
test_conversions (test.test_fstring.TestCase.test_conversions) (str="f'{3! s }'") ... FAIL
test_custom_format_specifier (test.test_fstring.TestCase.test_custom_format_specifier) ... ok
test_debug_conversion (test.test_fstring.TestCase.test_debug_conversion) ... ok
test_debug_expressions_are_raw_strings (test.test_fstring.TestCase.test_debug_expressions_are_raw_strings) ... ok
test_debug_in_file (test.test_fstring.TestCase.test_debug_in_file) ... ok
test_del (test.test_fstring.TestCase.test_del) ... ok
test_dict (test.test_fstring.TestCase.test_dict) ... ok
test_docstring (test.test_fstring.TestCase.test_docstring) ... ok
test_double_braces (test.test_fstring.TestCase.test_double_braces) ... ok
test_empty_format_specifier (test.test_fstring.TestCase.test_empty_format_specifier) ... ok
test_equal_equal (test.test_fstring.TestCase.test_equal_equal) ... ok
test_errors (test.test_fstring.TestCase.test_errors) ... ok
test_expressions_with_triple_quoted_strings (test.test_fstring.TestCase.test_expressions_with_triple_quoted_strings) ... ok
test_filename_in_syntaxerror (test.test_fstring.TestCase.test_filename_in_syntaxerror) ... ok
test_format_specifier_expressions (test.test_fstring.TestCase.test_format_specifier_expressions) ... ok
test_fstring_backslash_before_double_bracket (test.test_fstring.TestCase.test_fstring_backslash_before_double_bracket) ... ok
test_fstring_backslash_before_double_bracket_warns_once (test.test_fstring.TestCase.test_fstring_backslash_before_double_bracket_warns_once) ... FAIL
test_fstring_backslash_prefix_raw (test.test_fstring.TestCase.test_fstring_backslash_prefix_raw) ... ok
test_fstring_format_spec_greedy_matching (test.test_fstring.TestCase.test_fstring_format_spec_greedy_matching) ... ok
test_fstring_nested_too_deeply (test.test_fstring.TestCase.test_fstring_nested_too_deeply) ...
test_fstring_nested_too_deeply (test.test_fstring.TestCase.test_fstring_nested_too_deeply) (str='f"{1+2:{1+2:{1+1:{1}}}}"') ... FAIL
test_fstring_nested_too_deeply (test.test_fstring.TestCase.test_fstring_nested_too_deeply) (str='f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"') ... FAIL
test_gh129093 (test.test_fstring.TestCase.test_gh129093) ... ok
test_global (test.test_fstring.TestCase.test_global) ... ok
test_if_conditional (test.test_fstring.TestCase.test_if_conditional) ... ok
test_invalid_backslashes_inside_fstring_context (test.test_fstring.TestCase.test_invalid_backslashes_inside_fstring_context) ...
test_invalid_backslashes_inside_fstring_context (test.test_fstring.TestCase.test_invalid_backslashes_inside_fstring_context) (str='\\') ... FAIL
test_invalid_string_prefixes (test.test_fstring.TestCase.test_invalid_string_prefixes) ... ok
test_invalid_syntax_error_message (test.test_fstring.TestCase.test_invalid_syntax_error_message) ... ok
test_lambda (test.test_fstring.TestCase.test_lambda) ... ok
test_leading_trailing_spaces (test.test_fstring.TestCase.test_leading_trailing_spaces) ... ok
test_literal (test.test_fstring.TestCase.test_literal) ... ok
test_literal_eval (test.test_fstring.TestCase.test_literal_eval) ... ok
test_locals (test.test_fstring.TestCase.test_locals) ... ok
test_loop (test.test_fstring.TestCase.test_loop) ... ok
test_many_expressions (test.test_fstring.TestCase.test_many_expressions) ... ok
test_misformed_unicode_character_name (test.test_fstring.TestCase.test_misformed_unicode_character_name) ... ok
test_mismatched_braces (test.test_fstring.TestCase.test_mismatched_braces) ... ok
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) ...
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{((}'") ... FAIL
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a[4)}'") ... FAIL
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a(4]}'") ... FAIL
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a[4}'") ... FAIL
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a(4}'") ... FAIL
test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) ... ERROR
test_missing_expression (test.test_fstring.TestCase.test_missing_expression) ...
test_missing_expression (test.test_fstring.TestCase.test_missing_expression) (str="f'{!'") ... FAIL
test_missing_expression (test.test_fstring.TestCase.test_missing_expression) (str="f'{='") ... FAIL
test_missing_format_spec (test.test_fstring.TestCase.test_missing_format_spec) ... ok
test_missing_variable (test.test_fstring.TestCase.test_missing_variable) ... ok
test_multiple_vars (test.test_fstring.TestCase.test_multiple_vars) ... ok
test_nested_fstrings (test.test_fstring.TestCase.test_nested_fstrings) ... ok
test_newlines_before_syntax_error (test.test_fstring.TestCase.test_newlines_before_syntax_error) ... ok
test_newlines_in_expressions (test.test_fstring.TestCase.test_newlines_in_expressions) ... ok
test_no_escapes_for_braces (test.test_fstring.TestCase.test_no_escapes_for_braces)
Only literal curly braces begin an expression. ... ok
test_not_closing_quotes (test.test_fstring.TestCase.test_not_closing_quotes) ... FAIL
test_not_equal (test.test_fstring.TestCase.test_not_equal) ... ok
test_parens_in_expressions (test.test_fstring.TestCase.test_parens_in_expressions) ...
test_parens_in_expressions (test.test_fstring.TestCase.test_parens_in_expressions) (str="f'{3)+(4}'") ... FAIL
test_roundtrip_raw_quotes (test.test_fstring.TestCase.test_roundtrip_raw_quotes) ... ok
test_shadowed_global (test.test_fstring.TestCase.test_shadowed_global) ... ok
test_side_effect_order (test.test_fstring.TestCase.test_side_effect_order) ... ok
test_str_format_differences (test.test_fstring.TestCase.test_str_format_differences) ... ok
test_syntax_error_after_debug (test.test_fstring.TestCase.test_syntax_error_after_debug) ... ok
test_syntax_error_for_starred_expressions (test.test_fstring.TestCase.test_syntax_error_for_starred_expressions) ... ok
test_syntax_error_in_nested_fstring (test.test_fstring.TestCase.test_syntax_error_in_nested_fstring) ... ok
test_syntax_warning_infinite_recursion_in_file (test.test_fstring.TestCase.test_syntax_warning_infinite_recursion_in_file) ... ok
test_unterminated_string (test.test_fstring.TestCase.test_unterminated_string) ... ok
test_valid_prefixes (test.test_fstring.TestCase.test_valid_prefixes) ... ok
test_walrus (test.test_fstring.TestCase.test_walrus) ... ok
test_with_a_commas_and_an_underscore_in_format_specifier (test.test_fstring.TestCase.test_with_a_commas_and_an_underscore_in_format_specifier) ... ok
test_with_an_underscore_and_a_comma_in_format_specifier (test.test_fstring.TestCase.test_with_an_underscore_and_a_comma_in_format_specifier) ... ok
test_with_two_commas_in_format_specifier (test.test_fstring.TestCase.test_with_two_commas_in_format_specifier) ... ok
test_with_two_underscore_in_format_specifier (test.test_fstring.TestCase.test_with_two_underscore_in_format_specifier) ... ok
test_yield (test.test_fstring.TestCase.test_yield) ... ok
test_yield_send (test.test_fstring.TestCase.test_yield_send) ... ok
======================================================================
ERROR: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 596, in test_mismatched_parens
self.assertRaises(SyntaxError, eval, "f'{" + "(" * 500 + "}'")
^^^^^^^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/unittest/case.py", line 778, in assertRaises
return context.handle('assertRaises', args, kwargs)
^^^^^^
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/unittest/case.py", line 238, in handle
callable_obj(*args, **kwargs)
RecursionError: maximum recursion depth exceeded
======================================================================
FAIL: test_comments (test.test_fstring.TestCase.test_comments) (str="f'{)#}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{)#}'
^
SyntaxError: f-string: expecting a valid expression after '{'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: unmatched '\)'" does not match "f-string: expecting a valid expression after '{' (<string>, line 1)"
======================================================================
FAIL: test_conversions (test.test_fstring.TestCase.test_conversions) (str="f'{3! s}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{3! s}'
^^^
SyntaxError: f-string: conversion type must come right after the exclamation mark
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: conversion type must come right after the exclamanation mark" does not match "f-string: conversion type must come right after the exclamation mark (<string>, line 1)"
======================================================================
FAIL: test_conversions (test.test_fstring.TestCase.test_conversions) (str="f'{3! s }'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{3! s }'
^^^
SyntaxError: f-string: conversion type must come right after the exclamation mark
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: conversion type must come right after the exclamanation mark" does not match "f-string: conversion type must come right after the exclamation mark (<string>, line 1)"
======================================================================
FAIL: test_fstring_backslash_before_double_bracket_warns_once (test.test_fstring.TestCase.test_fstring_backslash_before_double_bracket_warns_once)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 1184, in test_fstring_backslash_before_double_bracket_warns_once
self.assertEqual(len(w.warnings), 1)
^^^^^^^^^^^
AssertionError: 2 != 1
======================================================================
FAIL: test_fstring_nested_too_deeply (test.test_fstring.TestCase.test_fstring_nested_too_deeply) (str='f"{1+2:{1+2:{1+1:{1}}}}"')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: SyntaxError not raised
======================================================================
FAIL: test_fstring_nested_too_deeply (test.test_fstring.TestCase.test_fstring_nested_too_deeply) (str='f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: SyntaxError not raised
======================================================================
FAIL: test_invalid_backslashes_inside_fstring_context (test.test_fstring.TestCase.test_invalid_backslashes_inside_fstring_context) (str='\\')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
\
^
SyntaxError: unexpected end of file (EOF) in multi-line statement
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "unexpected character after line continuation" does not match "unexpected end of file (EOF) in multi-line statement (<string>, line 1)"
======================================================================
FAIL: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{((}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{((}'
^
SyntaxError: f-string: expecting a valid expression after '{'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "closing parenthesis '\}' does not match opening parenthesis '\('" does not match "f-string: expecting a valid expression after '{' (<string>, line 1)"
======================================================================
FAIL: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a[4)}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{a[4)}'
^
SyntaxError: f-string: expecting '=', or '!', or ':', or '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "closing parenthesis '\)' does not match opening parenthesis '\['" does not match "f-string: expecting '=', or '!', or ':', or '}' (<string>, line 1)"
======================================================================
FAIL: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a(4]}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{a(4]}'
^
SyntaxError: f-string: expecting '=', or '!', or ':', or '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "closing parenthesis '\]' does not match opening parenthesis '\('" does not match "f-string: expecting '=', or '!', or ':', or '}' (<string>, line 1)"
======================================================================
FAIL: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a[4}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{a[4}'
^
SyntaxError: f-string: expecting '=', or '!', or ':', or '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "closing parenthesis '\}' does not match opening parenthesis '\['" does not match "f-string: expecting '=', or '!', or ':', or '}' (<string>, line 1)"
======================================================================
FAIL: test_mismatched_parens (test.test_fstring.TestCase.test_mismatched_parens) (str="f'{a(4}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{a(4}'
^
SyntaxError: f-string: expecting '=', or '!', or ':', or '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "closing parenthesis '\}' does not match opening parenthesis '\('" does not match "f-string: expecting '=', or '!', or ':', or '}' (<string>, line 1)"
======================================================================
FAIL: test_missing_expression (test.test_fstring.TestCase.test_missing_expression) (str="f'{!'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{!'
^
SyntaxError: f-string: expecting '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: valid expression required before '!'" does not match "f-string: expecting '}' (<string>, line 1)"
======================================================================
FAIL: test_missing_expression (test.test_fstring.TestCase.test_missing_expression) (str="f'{='")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{='
^
SyntaxError: f-string: expecting '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: valid expression required before '='" does not match "f-string: expecting '}' (<string>, line 1)"
======================================================================
FAIL: test_not_closing_quotes (test.test_fstring.TestCase.test_not_closing_quotes)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 1836, in test_not_closing_quotes
compile(data, "?", "exec")
File "?", line 3
z = f"""
^
SyntaxError: unterminated triple-quoted f-string literal (detected at line 7)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 1838, in test_not_closing_quotes
self.assertEqual(e.text, 'z = f"""')
^^^^^^^^^^^
AssertionError: 'z = f"""\n' != 'z = f"""'
z = f"""
-
======================================================================
FAIL: test_parens_in_expressions (test.test_fstring.TestCase.test_parens_in_expressions) (str="f'{3)+(4}'")
----------------------------------------------------------------------
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 37, in assertAllRaise
eval(str)
File "<string>", line 1
f'{3)+(4}'
^
SyntaxError: f-string: expecting '=', or '!', or ':', or '}'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py", line 36, in assertAllRaise
with self.assertRaisesRegex(exception_type, regex):
AssertionError: "f-string: unmatched '\)'" does not match "f-string: expecting '=', or '!', or ':', or '}' (<string>, line 1)"
----------------------------------------------------------------------
Ran 85 tests in 0.557s
FAILED (failures=16, errors=1)
0:00:00 load avg: 0.73 [1/1/1] test_fstring failed (1 error, 16 failures)
== Tests result: FAILURE ==
1 test failed:
test_fstring
Total duration: 705 ms
Total tests: run=85 failures=16
Total test files: run=1/1 failed=1
Result: FAILURE
/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_fstring.py:1769: SyntaxWarning: invalid escape sequence '\N'
self.assertEqual(f'{b"\N{OX}"=}', 'b"\\N{OX}"=b\'\\\\N{OX}\'')
test test_fstring failed
builder: pypy-c-jit-linux-x86-64 build #11860+
test: lib-python/3/test/test_fstring.py::unmodified