Skip to content

Commit

Permalink
PartDesign: fix test Move_Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
usakhelo authored and yorikvanhavre committed Sep 30, 2016
1 parent ef14bbd commit 3844300
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/PartDesign/TestPartDesignGui.py
Expand Up @@ -52,7 +52,6 @@ def __call__(self):
cbox = diag.findChild(QtGui.QComboBox)
self.test.assertIsNotNone(cbox, "ComboBox widget could not be found")
if (cbox != None):
cbox.setCurrentIndex(1)
QtCore.QTimer.singleShot(0, diag, QtCore.SLOT('accept()'))

App = FreeCAD
Expand All @@ -65,7 +64,7 @@ def setUp(self):
self.Doc = FreeCAD.newDocument("SketchGuiTest")

def testRefuseToMoveSingleFeature(self):
FreeCAD.Console.PrintMessage('Testing moving one feature from one body to another\n')
FreeCAD.Console.PrintMessage('Testing refuse to move the feature with dependecies from one body to another\n')
self.BodySource = self.Doc.addObject('PartDesign::Body','Body')
Gui.activeView().setActiveObject('pdbody', self.BodySource)

Expand Down Expand Up @@ -177,6 +176,8 @@ def testMoveSingleFeature(self):
QtCore.QTimer.singleShot(500, cobj)
Gui.runCommand('PartDesign_MoveFeature')
#assert depenedencies of the Sketch
self.Doc.recompute()

self.assertFalse(self.Sketch.Support[0][0] in self.BodySource.Origin.OriginFeatures)
self.assertTrue(self.Sketch.Support[0][0] in self.BodyTarget.Origin.OriginFeatures)
self.assertEqual(len(self.BodySource.Model), 0, "Source body feature count is wrong")
Expand Down

0 comments on commit 3844300

Please sign in to comment.