diff options
author | scoder <stefan_ml@behnel.de> | 2020-10-03 06:07:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 06:07:07 (GMT) |
commit | 6a412c94b6b68e7e3632562dc7358a12ffd1447f (patch) | |
tree | a88c5e063ff2681ee334dfd92354c69aea3e4e28 /Lib/test/test_xml_etree.py | |
parent | d4b9edd5052a2d9ae3d2be69975cc933afb37737 (diff) | |
download | cpython-6a412c94b6b68e7e3632562dc7358a12ffd1447f.zip cpython-6a412c94b6b68e7e3632562dc7358a12ffd1447f.tar.gz cpython-6a412c94b6b68e7e3632562dc7358a12ffd1447f.tar.bz2 |
bpo-41900: C14N 2.0 serialisation failed for unprefixed attributes when a default namespace was defined. (GH-22474)
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r-- | Lib/test/test_xml_etree.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index d22c35d9..3f1f378 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -3899,6 +3899,14 @@ class C14NTest(unittest.TestCase): #self.assertEqual(c14n_roundtrip("<doc xmlns:x='http://example.com/x' xmlns='http://example.com/default'><b y:a1='1' xmlns='http://example.com/default' a3='3' xmlns:y='http://example.com/y' y:a2='2'/></doc>"), #'<doc xmlns:x="http://example.com/x"><b xmlns:y="http://example.com/y" a3="3" y:a1="1" y:a2="2"></b></doc>') + # Namespace issues + xml = '<X xmlns="http://nps/a"><Y targets="abc,xyz"></Y></X>' + self.assertEqual(c14n_roundtrip(xml), xml) + xml = '<X xmlns="http://nps/a"><Y xmlns="http://nsp/b" targets="abc,xyz"></Y></X>' + self.assertEqual(c14n_roundtrip(xml), xml) + xml = '<X xmlns="http://nps/a"><Y xmlns:b="http://nsp/b" b:targets="abc,xyz"></Y></X>' + self.assertEqual(c14n_roundtrip(xml), xml) + def test_c14n_exclusion(self): xml = textwrap.dedent("""\ <root xmlns:x="http://example.com/x"> |