summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sax.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-06 06:38:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-06 06:38:22 (GMT)
commit9749b5a6a36859518c2136e3050a01008b2478eb (patch)
treeb13504474193306e7b40d9e92dc0be13a0bb7830 /Lib/test/test_sax.py
parent076dbd05600337057723b831bfad6f6cb1873100 (diff)
parentab914780ba6165620e3db81d11cb631de58b655a (diff)
downloadcpython-9749b5a6a36859518c2136e3050a01008b2478eb.zip
cpython-9749b5a6a36859518c2136e3050a01008b2478eb.tar.gz
cpython-9749b5a6a36859518c2136e3050a01008b2478eb.tar.bz2
Issue #24125: Saved error's line and column numbers when an error is occured
during closing expatreader. Fixed a regression introduced in issue #23865.
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r--Lib/test/test_sax.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 85c1cfe..2411895 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -1166,6 +1166,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