Part: [skip ci] unit tests for PR #6732

This commit is contained in:
wmayer
2022-04-19 12:25:13 +02:00
parent ad0dba3d3a
commit 348a6da23f

View File

@@ -151,6 +151,15 @@ class PartTestBSplineCurve(unittest.TestCase):
self.assertEqual(Spreadsheet.C2, Units.Quantity('8 mm'))
App.closeDocument("Issue2876")
def testSubElements(self):
box = Part.makeBox(1, 1, 1)
with self.assertRaises(ValueError):
box.getElement("InvalidName")
with self.assertRaises(ValueError):
box.getElement("Face6_abc")
with self.assertRaises(Part.OCCError):
box.getElement("Face7")
def tearDown(self):
#closing doc
FreeCAD.closeDocument("PartTest")