summaryrefslogtreecommitdiff
path: root/Lib/test/test_xml_etree.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2020-10-19 15:50:36 +0100
committerGitHub <noreply@github.com>2020-10-19 15:50:36 +0100
commitc82f10450c547eb94a04ee17b7c816ff31948297 (patch)
treead305c05c5745e1a5e7c136545bec7eefa741e32 /Lib/test/test_xml_etree.py
parenteee6bb50c69d94280f43b47390ea9d1b5f42930c (diff)
parentb580ed1d9d55461d8dde027411b90be26cae131e (diff)
downloadcpython-git-bpo-39107.tar.gz
Merge branch 'master' into bpo-39107bpo-39107
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r--Lib/test/test_xml_etree.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index d22c35d92c..3f1f3781e4 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">