]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix tests Radius and Tangemt. Radios does not work.
authorspo <sergey.pokhodenko@opencascade.com>
Wed, 15 Jun 2016 14:39:51 +0000 (17:39 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:10 +0000 (14:41 +0300)
src/PythonAPI/Test/TestSketcherSetRadius.py
src/PythonAPI/Test/TestSketcherSetTangent.py

index 7f40c547b5b550248ac10c6091cb96c99fae79f9..d713ab7ae3b921d02fa097e96b8677f56dfb463a 100644 (file)
@@ -5,17 +5,17 @@ from TestSketcher import SketcherTestCase
 class SketcherSetRadius(SketcherTestCase):
     def test_set_radius(self):
         circle = self.sketch.addCircle(0, 10, 20)
-        self.sketch.setRadius(circle.result(), 30)
+        self.sketch.setRadius(circle, 30)
         model.do()
-        self.assertEqual(circle.radius(), 30.0)
+        self.assertEqual(circle.radius().value(), 30.0)
 
     def test_modify_radius(self):
         circle = self.sketch.addCircle(0, 10, 20)
-        radius_constraint = self.sketch.setRadius(circle.result(), 30)
+        radius_constraint = self.sketch.setRadius(circle, 30)
         model.do()
-        self.sketch.setValue(radius_constraint, 20)
+        self.sketch.setValue(radius_constraint, 25)
         model.do()
-        self.assertEqual(circle.radius(), 20.0)
+        self.assertEqual(circle.radius().value(), 25.0)
 
 if __name__ == "__main__":
     unittest.main(verbosity=2)
\ No newline at end of file
index 135379189d1559f02c99b0ab6999c726dcf49c34..f90f3e58eac0baa460770a37a2fe302ab4c84f29 100644 (file)
@@ -12,13 +12,13 @@ class SketcherSetTangent(SketcherTestCase):
             )
         
     def test_set_tangent(self):
-        self.sketch.setTangent(self.line.result(), self.arc.result())
+        self.sketch.setTangent(self.line, self.arc)
         model.do()
         # TODO : find a way to check that the constraint as been set
     
     def test_none_type_arguments(self):
         with self.assertRaises(TypeError):
-            self.sketch.setTangent(None, self.arc.result())
+            self.sketch.setTangent(None, self.arc)
 
 if __name__ == "__main__":
     unittest.main(verbosity=2)
\ No newline at end of file