changeset 618:9c135b1a3b60

It turns out that this test was a hoax and all it was doing was parsing normal string data... Redoing so that it's honest, and it works on Python 2.4 (which doesn't have `UTF-32`)
author dfraser
date Wed, 05 Aug 2009 09:50:56 +0000
parents 327dca35a74f
children 3dd1b2d4b2a7
files bitten/util/tests/xmlio.py
diffstat 1 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/util/tests/xmlio.py
+++ b/bitten/util/tests/xmlio.py
@@ -17,18 +17,9 @@
 
 class XMLIOTestCase(unittest.TestCase):
 
-    def test_parse_ucs_4(self):
-        """Tests that UCS-4/UTF-38-encoded data is parsed correctly"""
-        s = """<\x00\x00\x00b\x00\x00\x00u\x00\x00\x00i\x00\x00\x00l\x00\x00\x00d\x00\x00\x00 \x00\x00\x00x\x00\x00\x00m\x00\x00\x00l\x00\x00\x00n\x00\x00\x00s\x00\x00\x00:\x00\x00\x00c\x00\x00\x00=\x00\x00\x00"\x00\x00\x00h\x00\x00\x00t\x00\x00\x00t\x00\x00\x00p\x00\x00\x00:\x00\x00\x00/\x00\x00\x00/\x00\x00\x00b\x00\x00\x00i\x00\x00\x00t\x00\x00\x00t\x00\x00\x00e\x00\x00\x00n\x00\x00\x00.\x00\x00\x00c\x00\x00\x00m\x00\x00\x00l\x00\x00\x00e\x00\x00\x00n\x00\x00\x00z\x00\x00\x00.\x00\x00\x00n\x00\x00\x00e\x00\x00\x00t\x00\x00\x00/\x00\x00\x00t\x00\x00\x00o\x00\x00\x00o\x00\x00\x00l\x00\x00\x00s\x00\x00\x00/\x00\x00\x00c\x00\x00\x00"\x00\x00\x00>\x00\x00\x00
-\x00\x00\x00
-\x00\x00\x00 \x00\x00\x00 \x00\x00\x00<\x00\x00\x00s\x00\x00\x00t\x00\x00\x00e\x00\x00\x00p\x00\x00\x00 \x00\x00\x00i\x00\x00\x00d\x00\x00\x00=\x00\x00\x00"\x00\x00\x00b\x00\x00\x00u\x00\x00\x00i\x00\x00\x00l\x00\x00\x00d\x00\x00\x00"\x00\x00\x00 \x00\x00\x00d\x00\x00\x00e\x00\x00\x00s\x00\x00\x00c\x00\x00\x00r\x00\x00\x00i\x00\x00\x00p\x00\x00\x00t\x00\x00\x00i\x00\x00\x00o\x00\x00\x00n\x00\x00\x00=\x00\x00\x00"\x00\x00\x00C\x00\x00\x00o\x00\x00\x00n\x00\x00\x00f\x00\x00\x00i\x00\x00\x00g\x00\x00\x00u\x00\x00\x00r\x00\x00\x00e\x00\x00\x00 \x00\x00\x00a\x00\x00\x00n\x00\x00\x00d\x00\x00\x00 \x00\x00\x00b\x00\x00\x00u\x00\x00\x00i\x00\x00\x00l\x00\x00\x00d\x00\x00\x00"\x00\x00\x00>\x00\x00\x00
-\x00\x00\x00
-\x00\x00\x00 \x00\x00\x00 \x00\x00\x00 \x00\x00\x00 \x00\x00\x00<\x00\x00\x00c\x00\x00\x00:\x00\x00\x00c\x00\x00\x00o\x00\x00\x00n\x00\x00\x00f\x00\x00\x00i\x00\x00\x00g\x00\x00\x00u\x00\x00\x00r\x00\x00\x00e\x00\x00\x00 \x00\x00\x00/\x00\x00\x00>\x00\x00\x00
-\x00\x00\x00
-\x00\x00\x00 \x00\x00\x00 \x00\x00\x00<\x00\x00\x00/\x00\x00\x00s\x00\x00\x00t\x00\x00\x00e\x00\x00\x00p\x00\x00\x00>\x00\x00\x00
-\x00\x00\x00
-\x00\x00\x00<\x00\x00\x00/\x00\x00\x00b\x00\x00\x00u\x00\x00\x00i\x00\x00\x00l\x00\x00\x00d\x00\x00\x00>\x00\x00\x00"""
-        s = s.decode("UTF-32").encode("UTF-8")
+    def test_parse(self):
+        """Tests that simple test data is parsed correctly"""
+        s = """<build xmlns:c="http://bitten.cmlenz.net/tools/c">\n\n  <step id="build" description="Configure and build">\n\n    <c:configure />\n\n  </step>\n\n</build>"""
         x = xmlio.parse(s)
         assert x.name == "build"
 
Copyright (C) 2012-2017 Edgewall Software