From 2cbad7a9c6838274f90cf99cb75ffa4910277533 Mon Sep 17 00:00:00 2001 From: spo Date: Wed, 15 Jun 2016 17:39:51 +0300 Subject: [PATCH] Fix tests Radius and Tangemt. Radios does not work. --- src/PythonAPI/Test/TestSketcherSetRadius.py | 10 +++++----- src/PythonAPI/Test/TestSketcherSetTangent.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PythonAPI/Test/TestSketcherSetRadius.py b/src/PythonAPI/Test/TestSketcherSetRadius.py index 7f40c547b..d713ab7ae 100644 --- a/src/PythonAPI/Test/TestSketcherSetRadius.py +++ b/src/PythonAPI/Test/TestSketcherSetRadius.py @@ -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 diff --git a/src/PythonAPI/Test/TestSketcherSetTangent.py b/src/PythonAPI/Test/TestSketcherSetTangent.py index 135379189..f90f3e58e 100644 --- a/src/PythonAPI/Test/TestSketcherSetTangent.py +++ b/src/PythonAPI/Test/TestSketcherSetTangent.py @@ -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 -- 2.39.2