diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-11 12:39:01 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-11 12:39:01 (GMT) |
commit | 8b58339eb2939da4df822f7ea457b44e120fad45 (patch) | |
tree | d34029d80314da5bea6e6fccbc9f07e74fa50457 /Lib/test/test_support.py | |
parent | 49c14d8e8fe8f1897eef72ef45665b7afeec32d6 (diff) | |
download | cpython-8b58339eb2939da4df822f7ea457b44e120fad45.zip cpython-8b58339eb2939da4df822f7ea457b44e120fad45.tar.gz cpython-8b58339eb2939da4df822f7ea457b44e120fad45.tar.bz2 |
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.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 30f9f10..5e0f990 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 |