]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1648: Dump Python in the High Level Parameterized Geometry API
authordbv <dbv@opencascade.com>
Fri, 19 Aug 2016 12:02:57 +0000 (15:02 +0300)
committerdbv <dbv@opencascade.com>
Fri, 19 Aug 2016 13:12:26 +0000 (16:12 +0300)
Tests fix

src/PythonAPI/Test/TestFeaturesExtrusion.py

index a58c876629fe17bea43eca2dbcc92eb4582470f3..54e4f3ccc36d68544bdd0a4534affb6e18fc92bf 100644 (file)
@@ -56,9 +56,9 @@ class FeaturesAddExtrusionTestCase(FeaturesAddExtrusionFixture):
         self.assertEqual(extrusion.toSize().value(), 10)
         self.assertEqual(extrusion.fromSize().value(), 0)
         self.assertEqual(extrusion.toObject().context(), None)
-        self.assertEqual(extrusion.toOffset().value(), 0)
+        self.assertEqual(extrusion.toOffset().isInitialized(), False)
         self.assertEqual(extrusion.fromObject().context(), None)
-        self.assertEqual(extrusion.fromOffset().value(), 0)
+        self.assertEqual(extrusion.fromOffset().isInitialized(), False)
 
     def test_add_extrusion_by_face_and_planes(self):
         # base
@@ -85,8 +85,8 @@ class FeaturesAddExtrusionTestCase(FeaturesAddExtrusionFixture):
                                        from_object, 20)
 
         self.assertEqual(extrusion.creationMethod().value(), "ByPlanesAndOffsets")
-        self.assertEqual(extrusion.toSize().value(), 0)
-        self.assertEqual(extrusion.fromSize().value(), 0)
+        self.assertEqual(extrusion.toSize().isInitialized(), False)
+        self.assertEqual(extrusion.fromSize().isInitialized(), False)
 #         self.assertEqual(extrusion.getToObject().context(),
 #                          to_sketch.result())
         self.assertEqual(extrusion.toOffset().value(), 15)
@@ -126,9 +126,9 @@ class FeaturesExtrusionTestCase(FeaturesExtrusionFixture):
         self.assertEqual(self.extrusion.toSize().value(), 15)
         self.assertEqual(self.extrusion.fromSize().value(), 20)
         self.assertEqual(self.extrusion.toObject().context(), None)
-        self.assertEqual(self.extrusion.toOffset().value(), 0)
+        self.assertEqual(self.extrusion.toOffset().isInitialized(), False)
         self.assertEqual(self.extrusion.fromObject().context(), None)
-        self.assertEqual(self.extrusion.fromOffset().value(), 0)
+        self.assertEqual(self.extrusion.fromOffset().isInitialized(), False)
 
     def test_extrusion_set_planes_and_offsets(self):
         # to
@@ -146,6 +146,9 @@ class FeaturesExtrusionTestCase(FeaturesExtrusionFixture):
 
         to_object = to_sketch.selectFace()[0]
         from_object = from_sketch.selectFace()[0]
+
+        self.part.moveFeature(self.extrusion.feature(), from_sketch.feature())
+
         self.extrusion.setPlanesAndOffsets(to_object, 15, from_object, 20)