From 348a6da23f3df834c96078dccc19e84f1e035d78 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 19 Apr 2022 12:25:13 +0200 Subject: [PATCH] Part: [skip ci] unit tests for PR #6732 --- src/Mod/Part/TestPartApp.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Mod/Part/TestPartApp.py b/src/Mod/Part/TestPartApp.py index 1c861ebf2d..2002d4b944 100644 --- a/src/Mod/Part/TestPartApp.py +++ b/src/Mod/Part/TestPartApp.py @@ -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")