summaryrefslogtreecommitdiff
path: root/Lib/test/test_fstring.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-22 23:29:27 +0100
committerGitHub <noreply@github.com>2020-04-22 23:29:27 +0100
commitc5fc15685202cda73f7c3f5c6f299b0945f58508 (patch)
tree7624ae45b95f2812e801c5879bdbdcb796f570a6 /Lib/test/test_fstring.py
parenta81849b0315277bb3937271174aaaa5059c0b445 (diff)
downloadcpython-git-c5fc15685202cda73f7c3f5c6f299b0945f58508.tar.gz
bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r--Lib/test/test_fstring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index fe465b7e1d..802b08341e 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -10,6 +10,7 @@
import ast
import types
import decimal
+import sys
import unittest
a_global = 'global variable'
@@ -205,7 +206,8 @@ f'{a * f"-{x()}-"}'"""
call = binop.right.values[1].value
self.assertEqual(type(call), ast.Call)
self.assertEqual(call.lineno, 3)
- self.assertEqual(call.col_offset, 11)
+ if not sys.flags.use_peg:
+ self.assertEqual(call.col_offset, 11)
def test_ast_line_numbers_duplicate_expression(self):
"""Duplicate expression