summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_global.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-11 12:43:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-11 12:43:18 (GMT)
commit8114f21668fe9775d2542d079c6396a745f4f094 (patch)
tree62ef9087e76229ea0fd18d0a1052abd79c9ae2f3 /Lib/test/test_global.py
parent0a7b8596c075b3d69e2fae3c71746415ba3bad39 (diff)
parent8b58339eb2939da4df822f7ea457b44e120fad45 (diff)
downloadcpython-8114f21668fe9775d2542d079c6396a745f4f094.zip
cpython-8114f21668fe9775d2542d079c6396a745f4f094.tar.gz
cpython-8114f21668fe9775d2542d079c6396a745f4f094.tar.bz2
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
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 37ec672..9eeccf1 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)
+ check_syntax_error(self, prog_text_1, lineno=4, offset=4)
def test2(self):
prog_text_2 = """\
@@ -32,7 +32,7 @@ def wrong2():
print(x)
global x
"""
- check_syntax_error(self, prog_text_2)
+ check_syntax_error(self, prog_text_2, lineno=3, offset=4)
def test3(self):
prog_text_3 = """\
@@ -41,7 +41,7 @@ def wrong3():
x = 2
global x
"""
- check_syntax_error(self, prog_text_3)
+ check_syntax_error(self, prog_text_3, lineno=4, offset=4)
def test4(self):
prog_text_4 = """\