summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fstring.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30465: Fix lineno and col_offset in fstring AST nodes (GH-1800) (gh-3409)Miss Islington (bot)2017-09-071-0/+248
| | | | For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly. (cherry picked from commit e7c566caf177afe43b57f0b2723e723d880368e8)
* [3.6] bpo-30682: Removed a too-strict assertion that failed for certain ↵Serhiy Storchaka2017-06-161-0/+6
| | | | | | f-strings. (GH-2232) (#2242) This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build.. (cherry picked from commit 11e97f2f80bf65cc828c127eafc95229df35d403)
* [3.6] bpo-30529: Fix errors for invalid whitespaces in f-string ↵Serhiy Storchaka2017-06-081-0/+10
| | | | | | | | subexpressions. (GH-1888) (#2013) 'invalid character in identifier' now is raised instead of 'f-string: empty expression not allowed' if a subexpression contains only whitespaces and they are not accepted by Python parser. (cherry picked from commit 2e9cd58)
* [3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812)Serhiy Storchaka2017-05-251-0/+14
| | | (cherry picked from commit 0cd7a3f)
* Issue #28739: f-string expressions no longer accepted as docstrings andSerhiy Storchaka2016-12-111-10/+10
| | | | by ast.literal_eval() even if they do not include subexpressions.
* Fixed issue #28633: segfault when concatenating bytes literal and f-string.Eric V. Smith2016-11-071-0/+7
|
* Update test_no_escapes_for_braces to clarify behavior with a docstring and ↵Jason R. Coombs2016-11-061-5/+8
| | | | expressions that clearly are not evaluated.
* Additionally show that a backslash-escaped opening brace is treated as a ↵Jason R. Coombs2016-11-061-0/+1
| | | | literal and thus triggers the single closing brace error, clarifying #28590.
* Add an additional test with a newline, one that's very similar to ↵Jason R. Coombs2016-11-061-0/+1
| | | | test_parens_in_expressions, but because the newline is not a literal newline, but a backslash en, this error is triggered.
* Update the f-string test broken in issue #28385.Serhiy Storchaka2016-10-311-1/+1
|
* Add another f-string comment test, to make sure # are being caught in the ↵Eric V. Smith2016-09-111-0/+2
| | | | right place.
* Make an f-string error message more exact and consistent.Eric V. Smith2016-09-111-1/+2
|
* Issue 27948: Allow backslashes in the literal string portion of f-strings, ↵Eric V. Smith2016-09-101-46/+86
| | | | but not in the expressions. Also, require expressions to begin and end with literal curly braces.
* Closes issue 27921: Disallow backslashes anywhere in f-strings. This is a ↵Eric V. Smith2016-09-031-91/+51
| | | | temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
* Issue #27626: Further spelling fixes for 3.6Martin Panter2016-07-281-1/+1
|
* Fix issue 26287: While handling FORMAT_VALUE opcode, the top of stack was ↵Eric V. Smith2016-02-051-0/+11
| | | | being corrupted if an error occurred in PyObject_Format().
* f-strings: More tests for empty expressions along with missing closing braces.Eric V. Smith2015-09-231-0/+7
|
* Added more f-string test for empty expressions.Eric V. Smith2015-09-231-0/+3
|
* Move f-string compilation of the expression earlier, before the conversion ↵Eric V. Smith2015-09-231-0/+9
| | | | character and format_spec are checked. This allows for error messages that more closely match what a user would expect.
* Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵Eric V. Smith2015-09-191-0/+715
Documentation is still needed, I'll open an issue for that.