Cleaned up a few of the assert statements and fixed the findall line in exporters.py based on a FutureWarning.

This commit is contained in:
Jeremy Wright 2014-08-19 08:10:46 -04:00
parent 0e5980400a
commit 55b70c882c
2 changed files with 5 additions and 10 deletions

View File

@ -239,7 +239,7 @@ def getPaths(freeCadSVG):
#yuk, freecad returns svg fragments. stupid stupid
fullDoc = "<root>%s</root>" % freeCadSVG
e = ET.ElementTree(ET.fromstring(fullDoc))
segments = e.findall("//g")
segments = e.findall(".//g")
for s in segments:
paths = s.findall("path")

View File

@ -38,15 +38,10 @@ class TestImporters(BaseTest):
#Check to make sure we got a solid back
self.assertTrue(importedShape.val().ShapeType() == "Solid")
#Check the number of vertices per face to make sure we have a box shape
self.assertTrue(importedShape.faces("+X").vertices().size() == 4)
self.assertTrue(importedShape.faces("+Y").vertices().size() == 4)
self.assertTrue(importedShape.faces("+Z").vertices().size() == 4)
#Check the faces per selection on an axis to make sure we have a box shape
self.assertTrue(importedShape.faces("+X").size() == 1)
self.assertTrue(importedShape.faces("+Y").size() == 1)
self.assertTrue(importedShape.faces("+Z").size() == 1)
#Check the number of faces and vertices per face to make sure we have a box shape
self.assertTrue(importedShape.faces("+X").size() == 1 and importedShape.faces("+X").vertices().size() == 4)
self.assertTrue(importedShape.faces("+Y").size() == 1 and importedShape.faces("+Y").vertices().size() == 4)
self.assertTrue(importedShape.faces("+Z").size() == 1 and importedShape.faces("+Z").vertices().size() == 4)
def testSTEP(self):
"""