summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_global.py
diff options
context:
space:
mode:
authorAmmar Askar <ammar_askar@hotmail.com>2018-09-24 21:12:49 (GMT)
committerGuido van Rossum <guido@python.org>2018-09-24 21:12:49 (GMT)
commit025eb98dc0c1dc27404df6c544fc2944e0fa9f3a (patch)
treead93cb6963abd43430766fa85b629b2d5896889b /Lib/test/test_global.py
parent223e501fb9c2b6ae21b96054e20c4c31d94a5d96 (diff)
downloadcpython-025eb98dc0c1dc27404df6c544fc2944e0fa9f3a.zip
cpython-025eb98dc0c1dc27404df6c544fc2944e0fa9f3a.tar.gz
cpython-025eb98dc0c1dc27404df6c544fc2944e0fa9f3a.tar.bz2
bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338)
Also point to start of tokens in parsing errors. Fixes bpo-34683
Diffstat (limited to 'Lib/test/test_global.py')
-rw-r--r--Lib/test/test_global.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_global.py b/Lib/test/test_global.py
index 9eeccf1..8159602 100644
--- a/Lib/test/test_global.py
+++ b/Lib/test/test_global.py
@@ -24,7 +24,7 @@ def wrong1():
global a
global b
"""
- check_syntax_error(self, prog_text_1, lineno=4, offset=4)
+ check_syntax_error(self, prog_text_1, lineno=4, offset=5)
def test2(self):
prog_text_2 = """\
@@ -32,7 +32,7 @@ def wrong2():
print(x)
global x
"""
- check_syntax_error(self, prog_text_2, lineno=3, offset=4)
+ check_syntax_error(self, prog_text_2, lineno=3, offset=5)
def test3(self):
prog_text_3 = """\
@@ -41,7 +41,7 @@ def wrong3():
x = 2
global x
"""
- check_syntax_error(self, prog_text_3, lineno=4, offset=4)
+ check_syntax_error(self, prog_text_3, lineno=4, offset=5)
def test4(self):
prog_text_4 = """\