Skip to content

Commit

Permalink
Add missing assertions for PartDesign Datum tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkremitzki committed Jul 11, 2017
1 parent 58d0b31 commit 4331a80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/PartDesign/PartDesignTests/TestDatum.py
Expand Up @@ -35,6 +35,7 @@ def testOriginDatumPoint(self):
self.DatumPoint.MapMode = 'ObjectOrigin'
self.Body.addObject(self.DatumPoint)
self.Doc.recompute()
self.assertEqual(self.DatumPoint.superPlacement.Base, App.Vector(0))

def tearDown(self):
#closing doc
Expand All @@ -52,6 +53,7 @@ def testXAxisDatumLine(self):
self.DatumLine.MapMode = 'ObjectX'
self.Body.addObject(self.DatumLine)
self.Doc.recompute()
self.assertNotIn('Invalid', self.DatumLine.State)

def tearDown(self):
#closing doc
Expand All @@ -69,6 +71,8 @@ def testXYDatumPlane(self):
self.DatumPlane.MapMode = 'FlatFace'
self.Body.addObject(self.DatumPlane)
self.Doc.recompute()
self.DatumPlaneNormal = self.DatumPlane.Shape.Surface.Axis
self.assertEqual(abs(self.DatumPlaneNormal.dot(App.Vector(0,0,1))), 1)

def tearDown(self):
#closing doc
Expand Down

0 comments on commit 4331a80

Please sign in to comment.