Commits

Manfred Moitzi  committed 3ae1d8f

corrected test for Marker class

  • Participants
  • Parent commits 84bd723

Comments (0)

Files changed (1)

File tests/test_marker_class.py

 
 import sys
 import unittest
+import re
 
 from svgwrite.container import Marker, Group
 
     def test_add_subelement_with_autoid(self):
         marker = Marker(debug=True, profile='full')
         marker.add(Group())
-        self.assertEqual(marker.tostring(), '<marker id="id1" orient="auto"><g /></marker>')
+        self.assertTrue(
+            re.match('^<marker id="id\d+" orient="auto"><g /></marker>$',
+                     marker.tostring()), "getting an autoid for class Marker failed.")
 
     def test_insert(self):
         marker = Marker(id='test', insert=(1, 2), debug=True, profile='full')