summaryrefslogtreecommitdiff
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-12-11 14:39:01 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-12-11 14:39:01 +0200
commitd0b6fb7b0d6470bbda59e2d939ab8c9f6e77deea (patch)
tree0e285dd47c6bc5d835544b32597c975455491cad /Lib/test/test_support.py
parent64dd02151dd046bcd7c590413ff7f688005bcb80 (diff)
downloadcpython-d0b6fb7b0d6470bbda59e2d939ab8c9f6e77deea.tar.gz
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 30f9f10deb..5e0f990e40 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -240,8 +240,10 @@ class TestSupport(unittest.TestCase):
self.assertEqual(cm.exception.errno, errno.EBADF)
def test_check_syntax_error(self):
- support.check_syntax_error(self, "def class")
+ support.check_syntax_error(self, "def class", lineno=1, offset=9)
self.assertRaises(AssertionError, support.check_syntax_error, self, "1")
+ #with self.assertRaises(AssertionError):
+ #support.check_syntax_error(self, "x=1")
def test_CleanImport(self):
import importlib