Skip to content

Commit

Permalink
Stop warnings when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bgbsww committed Sep 25, 2024
1 parent b38c422 commit ab36c29
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Mod/PartDesign/InvoluteGearFeature.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def reject(self):
FreeCADGui.ActiveDocument.resetEdit()
FreeCAD.ActiveDocument.abortTransaction()


if FreeCAD.GuiUp:
FreeCADGui.addCommand('PartDesign_InvoluteGear',_CommandInvoluteGear())
# 09/25/2024 This causes a warning when running tests, does not appear to affect access
# to involute gears in the UI, and is a construction not found elsewhere. Maybe left over?
# if FreeCAD.GuiUp:
# FreeCADGui.addCommand('PartDesign_InvoluteGear',_CommandInvoluteGear())
6 changes: 5 additions & 1 deletion src/Mod/PartDesign/PartDesignTests/TestInvoluteGear.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ def testUsagePocketInternalGearProfile(self):
pocket.Reversed = True # need to "pocket upwards" into the cylinder
pocket.Type = 'ThroughAll'
self.assertSuccessfulRecompute()
self.assertSolid(pocket.Shape)
if pocket.Shape.ShapeType == 'Compound':
self.assertEqual(len(pocket.Shape.Solids), 1)
self.assertSolid(pocket.Shape.Solids[0])
else:
self.assertSolid(pocket.Shape)

def testRecomputeExternalGearFromV020(self):
FreeCAD.closeDocument(self.Doc.Name) # this was created in setUp(self)
Expand Down

0 comments on commit ab36c29

Please sign in to comment.