diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:39:58 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:39:58 (GMT) |
commit | 53855c6495b076143c7bf947817fc967e3068af2 (patch) | |
tree | 927ab5d5a3ec82ae11501b35c421ea91959d8eb6 /Lib/test | |
parent | e6c6e3d9c5d0bae998a71ad465c974d1b25084d9 (diff) | |
download | cpython-53855c6495b076143c7bf947817fc967e3068af2.zip cpython-53855c6495b076143c7bf947817fc967e3068af2.tar.gz cpython-53855c6495b076143c7bf947817fc967e3068af2.tar.bz2 |
Remove the xmllib module that was obsolete.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_xmllib.py | 51 | ||||
-rw-r--r-- | Lib/test/xmltests.py | 1 |
2 files changed, 0 insertions, 52 deletions
diff --git a/Lib/test/test_xmllib.py b/Lib/test/test_xmllib.py deleted file mode 100644 index 0780bc9..0000000 --- a/Lib/test/test_xmllib.py +++ /dev/null @@ -1,51 +0,0 @@ -'''Test module to thest the xmllib module. - Sjoerd Mullender -''' - -testdoc = """\ -<?xml version="1.0" encoding="UTF-8" standalone='yes' ?> -<!-- comments aren't allowed before the <?xml?> tag, - but they are allowed before the <!DOCTYPE> tag --> -<?processing instructions are allowed in the same places as comments ?> -<!DOCTYPE greeting [ - <!ELEMENT greeting (#PCDATA)> -]> -<greeting>Hello, world!</greeting> -""" - -nsdoc = "<foo xmlns='URI' attr='val'/>" - -import warnings -warnings.filterwarnings("ignore", ".* xmllib .* obsolete.*", - DeprecationWarning, r'xmllib$') - -from test import test_support -import unittest -import xmllib - -class XMLParserTestCase(unittest.TestCase): - - def test_simple(self): - parser = xmllib.XMLParser() - for c in testdoc: - parser.feed(c) - parser.close() - - def test_default_namespace(self): - class H(xmllib.XMLParser): - def unknown_starttag(self, name, attr): - self.name, self.attr = name, attr - h=H() - h.feed(nsdoc) - h.close() - # The default namespace applies to elements... - self.assertEquals(h.name, "URI foo") - # but not to attributes - self.assertEquals(h.attr, {'attr':'val'}) - - -def test_main(): - test_support.run_unittest(XMLParserTestCase) - -if __name__ == "__main__": - test_main() diff --git a/Lib/test/xmltests.py b/Lib/test/xmltests.py index d203709..446fe30 100644 --- a/Lib/test/xmltests.py +++ b/Lib/test/xmltests.py @@ -17,5 +17,4 @@ runtest("test.test_pyexpat") runtest("test.test_sax") runtest("test.test_xml_etree") runtest("test.test_xml_etree_c") -runtest("test.test_xmllib") runtest("test.test_xmlrpc") |