mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #24125: Saved error's line and column numbers when an error is occured
during closing expatreader. Fixed a regression introduced in issue #23865.
This commit is contained in:
parent
e8042e5e98
commit
ab914780ba
2 changed files with 15 additions and 2 deletions
|
|
@ -1126,6 +1126,8 @@ class ErrorReportingTest(unittest.TestCase):
|
|||
parser = create_parser()
|
||||
parser.setContentHandler(ContentHandler()) # do nothing
|
||||
self.assertRaises(SAXParseException, parser.parse, StringIO("<foo>"))
|
||||
self.assertEqual(parser.getColumnNumber(), 5)
|
||||
self.assertEqual(parser.getLineNumber(), 1)
|
||||
|
||||
def test_sax_parse_exception_str(self):
|
||||
# pass various values from a locator to the SAXParseException to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue