diff --git a/Lib/test/output/test_sax b/Lib/test/output/test_sax index 062a456d0c4..de49c805618 100644 --- a/Lib/test/output/test_sax +++ b/Lib/test/output/test_sax @@ -8,6 +8,7 @@ Passed test_expat_attrs_empty Passed test_expat_attrs_wattr Passed test_expat_dtdhandler Passed test_expat_entityresolver +Passed test_expat_file Passed test_expat_incomplete Passed test_expat_incremental Passed test_expat_incremental_reset @@ -30,4 +31,4 @@ Passed test_xmlgen_content_escape Passed test_xmlgen_ignorable Passed test_xmlgen_ns Passed test_xmlgen_pi -31 tests, 0 failures +32 tests, 0 failures diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index 59e14c5ef37..b4c840b622c 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -185,6 +185,18 @@ def test_filter_basic(): # # =========================================================================== +# ===== XMLReader support + +def test_expat_file(): + parser = create_parser() + result = StringIO() + xmlgen = XMLGenerator(result) + + parser.setContentHandler(xmlgen) + parser.parse(open(findfile("test.xml"))) + + return result.getvalue() == xml_test_out + # ===== DTDHandler support class TestDTDHandler: