From ff7a45d136ece3a6e5829761bce3c10df1354e68 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Mon, 29 Aug 2016 02:28:02 +0200 Subject: [PATCH] Add unittests for previous commit --- testscour.py | 7 +++++++ unittests/group-no-creation-tspan.svg | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 unittests/group-no-creation-tspan.svg diff --git a/testscour.py b/testscour.py index c31d86a..fa30bb6 100755 --- a/testscour.py +++ b/testscour.py @@ -1222,6 +1222,13 @@ class GroupNoCreation(unittest.TestCase): self.assertEqual(doc.getElementsByTagName('g').length, 0, 'Created a for a run of elements having dissimilar attributes') +class GroupNoCreationForTspan(unittest.TestCase): + def runTest(self): + doc = scour.scourXmlFile('unittests/group-no-creation-tspan.svg', + scour.parse_args(['--create-groups'])) + self.assertEqual(doc.getElementsByTagName('g').length, 0, + 'Created a for a run of s that are not allowed as children according to content model') + class DoNotCommonizeAttributesOnReferencedElements(unittest.TestCase): def runTest(self): doc = scour.scourXmlFile('unittests/commonized-referenced-elements.svg') diff --git a/unittests/group-no-creation-tspan.svg b/unittests/group-no-creation-tspan.svg new file mode 100644 index 0000000..65f3803 --- /dev/null +++ b/unittests/group-no-creation-tspan.svg @@ -0,0 +1,8 @@ + + + + text1 + text2 + text3 + +