diff options
author | R David Murray <rdmurray@bitdance.com> | 2011-10-01 20:22:35 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2011-10-01 20:22:35 (GMT) |
commit | 1d30db459d0c0c084813693740295ad6fce2c175 (patch) | |
tree | 14c416b9a68998a8d244771e69c3e65564803903 /Lib/test | |
parent | a02a12c517e69e457f4425aa5af6f55c36a6a39a (diff) | |
parent | 791744b07004222c31b4fca34e62607685aa11fa (diff) | |
download | cpython-1d30db459d0c0c084813693740295ad6fce2c175.zip cpython-1d30db459d0c0c084813693740295ad6fce2c175.tar.gz cpython-1d30db459d0c0c084813693740295ad6fce2c175.tar.bz2 |
merge #4147: minidom's toprettyxml no longer adds whitespace to text nodes.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_minidom.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 533258c..0a60136 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -467,6 +467,13 @@ class MinidomTest(unittest.TestCase): dom.unlink() self.confirm(domstr == str.replace("\n", "\r\n")) + def test_toPrettyXML_perserves_content_of_text_node(self): + str = '<A>B</A>' + dom = parseString(str) + dom2 = parseString(dom.toprettyxml()) + self.assertEqual(dom.childNodes[0].childNodes[0].toxml(), + dom2.childNodes[0].childNodes[0].toxml()) + def testProcessingInstruction(self): dom = parseString('<e><?mypi \t\n data \t\n ?></e>') pi = dom.documentElement.firstChild |