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
)
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