From d8b2497d91874a329ddf0ce53f88874874590e75 Mon Sep 17 00:00:00 2001 From: JSCHILL1 Date: Wed, 12 Aug 2009 09:51:18 -0500 Subject: [PATCH] Another unit test for namespace declaration --- testscour.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/testscour.py b/testscour.py index cfddb23..c52ca15 100755 --- a/testscour.py +++ b/testscour.py @@ -857,11 +857,17 @@ class WellFormedXMLAmpersandInTextContent(unittest.TestCase): self.assert_( wellformed.find('Peanut Butter & Jelly') != -1, 'Improperly serialized & in text content') -class NamespaceDeclPrefixesInXML(unittest.TestCase): +class WellFormedXMLNamespacePrefix(unittest.TestCase): + def runTest(self): + wellformed = scour.scourString(open('unittests/xml-well-formed.svg').read()) + self.assert_( wellformed.find('xmlns:foo=') != -1, + 'Improperly serialized namespace prefix declarations') + +class NamespaceDeclPrefixesInXMLWhenNotInDefaultNamespace(unittest.TestCase): def runTest(self): xmlstring = scour.scourString(open('unittests/xml-ns-decl.svg').read()) self.assert_( xmlstring.find('xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"') != -1, - 'Improperly serialized namespace prefix declarations') + 'Improperly serialized namespace prefix declarations when not in default namespace') # TODO; write a test for embedding rasters # TODO: write a test for --disable-embed-rasters # TODO: write tests for --keep-editor-data