Issue #24125: Saved error's line and column numbers when an error is occured
during closing expatreader. Fixed a regression introduced in issue #23865.
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 5019722..a4228dc 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -933,6 +933,8 @@
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