Skip to content

Commit 0702507

Browse files
committed
Added a test case for the saxutils.prepare_input_source setSystemId bug.
1 parent 4ced5e7 commit 0702507

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Lib/test/output/test_sax

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Passed test_expat_attrs_empty
88
Passed test_expat_attrs_wattr
99
Passed test_expat_dtdhandler
1010
Passed test_expat_entityresolver
11+
Passed test_expat_file
1112
Passed test_expat_incomplete
1213
Passed test_expat_incremental
1314
Passed test_expat_incremental_reset
@@ -30,4 +31,4 @@ Passed test_xmlgen_content_escape
3031
Passed test_xmlgen_ignorable
3132
Passed test_xmlgen_ns
3233
Passed test_xmlgen_pi
33-
31 tests, 0 failures
34+
32 tests, 0 failures

Lib/test/test_sax.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ def test_filter_basic():
185185
#
186186
# ===========================================================================
187187

188+
# ===== XMLReader support
189+
190+
def test_expat_file():
191+
parser = create_parser()
192+
result = StringIO()
193+
xmlgen = XMLGenerator(result)
194+
195+
parser.setContentHandler(xmlgen)
196+
parser.parse(open(findfile("test.xml")))
197+
198+
return result.getvalue() == xml_test_out
199+
188200
# ===== DTDHandler support
189201

190202
class TestDTDHandler:

0 commit comments

Comments
 (0)