Another unit test for namespace declaration
This commit is contained in:
parent
d4747e2bd7
commit
d8b2497d91
1 changed files with 8 additions and 2 deletions
10
testscour.py
10
testscour.py
|
|
@ -857,11 +857,17 @@ class WellFormedXMLAmpersandInTextContent(unittest.TestCase):
|
||||||
self.assert_( wellformed.find('<desc>Peanut Butter & Jelly</desc>') != -1,
|
self.assert_( wellformed.find('<desc>Peanut Butter & Jelly</desc>') != -1,
|
||||||
'Improperly serialized & in text content')
|
'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):
|
def runTest(self):
|
||||||
xmlstring = scour.scourString(open('unittests/xml-ns-decl.svg').read())
|
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,
|
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 embedding rasters
|
||||||
# TODO: write a test for --disable-embed-rasters
|
# TODO: write a test for --disable-embed-rasters
|
||||||
# TODO: write tests for --keep-editor-data
|
# TODO: write tests for --keep-editor-data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue