]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix test case for the Collinear constraint
authorazv <azv@opencascade.com>
Thu, 28 Jan 2016 11:07:44 +0000 (14:07 +0300)
committerazv <azv@opencascade.com>
Thu, 28 Jan 2016 11:07:44 +0000 (14:07 +0300)
src/SketchPlugin/Test/TestConstraintCollinear.py

index 46bd27340cc2fdbc08b9455c53951600a9b20f6a..dda5b8de16bebf0cd0ee03190de580a6d989ccd4 100644 (file)
@@ -19,11 +19,11 @@ __updated__ = "2016-01-28"
 
 
 def checkCollinearVec(theX1, theY1, theX2, theY2):
-    TOL = 1.e-6
+    TOL = 2.e-6
     aLen1 = math.hypot(theX1, theY1)
     aLen2 = math.hypot(theX2, theY2)
     aDot = theX1 * theX2 + theY1 * theY2
-    assert math.fabs(math.fabs(aDot) - aLen1 * aLen2) < TOL**2, "aDot = {0}, aLen1 = {1}, aLen2 = {2}, aDiff = {3}".format(aDot, aLen1, aLen2, math.fabs(aDot) - aLen1 * aLen2)
+    assert (math.fabs(math.fabs(aDot) - aLen1 * aLen2) < TOL**2)
 
 def checkCollinear(theLine1, theLine2):
     aStartPoint1 = geomDataAPI_Point2D(theLine1.attribute("StartPoint"))