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:
parent
0e5980400a
commit
55b70c882c
|
@ -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")
|
||||
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user