From 2985fd42b71dd26fc5bdff527ab037a13e359ab4 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 4 Oct 2018 15:00:52 +0300 Subject: [PATCH] Stabilize unit test TestMoveArc by setting higher tolerance for double-values compare For some reason, values 60.00000050101973 and 60.0 are not equal with 6 digits? --- src/SketchPlugin/Test/TestMoveArc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SketchPlugin/Test/TestMoveArc.py b/src/SketchPlugin/Test/TestMoveArc.py index ad78cc063..fab42aa61 100644 --- a/src/SketchPlugin/Test/TestMoveArc.py +++ b/src/SketchPlugin/Test/TestMoveArc.py @@ -51,17 +51,17 @@ class TestMoveArc(unittest.TestCase): self.assertEqual(model.dof(self.mySketch), self.myDOF) def checkPointCoordinates(self, thePoint, theCoordinates): - self.assertAlmostEqual(thePoint.x(), theCoordinates[0], 6) - self.assertAlmostEqual(thePoint.y(), theCoordinates[1], 6) + self.assertAlmostEqual(thePoint.x(), theCoordinates[0], 5) + self.assertAlmostEqual(thePoint.y(), theCoordinates[1], 5) def checkPointOnArc(self, theCoordinates): distPC = model.distancePointPoint(self.myArc.center(), theCoordinates) radius = model.distancePointPoint(self.myArc.center(), self.myArc.startPoint()) - self.assertAlmostEqual(distPC, radius, 6) + self.assertAlmostEqual(distPC, radius, 5) def checkArcRadius(self): radius = model.distancePointPoint(self.myArc.center(), self.myArc.startPoint()) - self.assertAlmostEqual(radius, self.myRadius, 6) + self.assertAlmostEqual(radius, self.myRadius, 5) def fixArcRadius(self): self.myRadius = 20. -- 2.39.2