mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #28512: Fixed setting the offset attribute of SyntaxError by
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
This commit is contained in:
parent
49c14d8e8f
commit
8b58339eb2
7 changed files with 56 additions and 58 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue