From 382d13ee77e67569543fa79b20cf8530c17f7399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20B=C3=A4hr?= Date: Fri, 3 Jan 2025 21:53:47 +0100 Subject: [PATCH] PD: Make GearTests independent of "single solid" setting When enabling the experimental "Allow multiple solids in Part Design Body by default" some involute gear tests broke. As a quick measure, `AllowCompound` was disabled for the respective body. This commit now makes the tests independent of this setting and removes the workaround. --- src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py b/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py index 8d1371778b..c109ec969e 100644 --- a/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py +++ b/src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py @@ -254,7 +254,6 @@ class TestInvoluteGear(unittest.TestCase): profile.HighPrecision = False profile.NumberOfTeeth = 8 body = self.Doc.addObject('PartDesign::Body','GearBody') - body.AllowCompound = False body.addObject(profile) cylinder = body.newObject('PartDesign::AdditiveCylinder','GearCylinder') default_dedendum = 1.25 @@ -325,7 +324,9 @@ class TestInvoluteGear(unittest.TestCase): return distance < Precision.intersection() def assertSolid(self, shape, msg=None): - self.assertEqual(shape.ShapeType, 'Solid', msg=msg) + # we don't check shape.ShapeType for 'Solid' as with body.AllowCompound==True + # we get, also in the good case, our solid wrapped in a compound. + self.assertEqual(len(shape.Solids), 1, msg=msg) def inv(a):