diff --git a/Lib/test/xmltestdata/test.xml b/Lib/test/xmltestdata/test.xml new file mode 100644 index 000000000..92136da76 --- /dev/null +++ b/Lib/test/xmltestdata/test.xml @@ -0,0 +1,115 @@ + + +Introduction to XSL +

Introduction to XSL

+ + + +
+

Overview +

+ + + + + + + +
+

Intro

+ + + + + + + +
+

History: XML and SGML

+ + + + + + + +
+

History: What are stylesheets?

+ + + + + + + +
+

History: FOSI

+ + + +µ + + diff --git a/Lib/test/xmltestdata/test.xml.out b/Lib/test/xmltestdata/test.xml.out new file mode 100644 index 000000000..f7e9ad293 --- /dev/null +++ b/Lib/test/xmltestdata/test.xml.out @@ -0,0 +1,115 @@ + + +Introduction to XSL +

Introduction to XSL

+ + + +
+

Overview +

+ + + + + + + +
+

Intro

+ + + + + + + +
+

History: XML and SGML

+ + + + + + + +
+

History: What are stylesheets?

+ + + + + + + +
+

History: FOSI

+ + + +µ + + \ No newline at end of file diff --git a/Lib/test/xmltests.py b/Lib/test/xmltests.py new file mode 100644 index 000000000..bf685a466 --- /dev/null +++ b/Lib/test/xmltests.py @@ -0,0 +1,21 @@ +# Convenience test module to run all of the XML-related tests in the +# standard library. + +import sys +import test.support + +test.support.verbose = 0 + +def runtest(name): + __import__(name) + module = sys.modules[name] + if hasattr(module, "test_main"): + module.test_main() + +runtest("test.test_minidom") +runtest("test.test_pyexpat") +runtest("test.test_sax") +runtest("test.test_xml_dom_minicompat") +runtest("test.test_xml_etree") +runtest("test.test_xml_etree_c") +runtest("test.test_xmlrpc") diff --git a/Lib/xml/dom/pulldom.py b/Lib/xml/dom/pulldom.py index 96a8d5951..913141cd7 100644 --- a/Lib/xml/dom/pulldom.py +++ b/Lib/xml/dom/pulldom.py @@ -216,19 +216,6 @@ class DOMEventStream: self.parser.setFeature(xml.sax.handler.feature_namespaces, 1) self.parser.setContentHandler(self.pulldom) - def __getitem__(self, pos): - import warnings - warnings.warn( - "DOMEventStream's __getitem__ method ignores 'pos' parameter. " - "Use iterator protocol instead.", - DeprecationWarning, - stacklevel=2 - ) - rc = self.getEvent() - if rc: - return rc - raise IndexError - def __next__(self): rc = self.getEvent() if rc: