Salome HOME
Fix errors and adjust unit tests
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintAngle.py
index 593349f77ff4ab1b596205bd98919c6db7f7c8c8..ac56c287c20fbe718ed8beaa04d5bef1d220778e 100644 (file)
@@ -78,7 +78,7 @@ aEndPoint.setValue(100., 25.)
 aSketchLineB = aSketchFeature.addFeature("SketchLine")
 aStartPoint = geomDataAPI_Point2D(aSketchLineB.attribute("StartPoint"))
 aEndPoint = geomDataAPI_Point2D(aSketchLineB.attribute("EndPoint"))
-aStartPoint.setValue(-20., 15.)
+aStartPoint.setValue(-10., 15.)
 aEndPoint.setValue(80., 50.)
 aSession.finishOperation()
 #=========================================================================
@@ -97,10 +97,13 @@ assert (not refattrB.isInitialized())
 refattrA.setObject(aSketchLineA.firstResult())
 refattrB.setObject(aSketchLineB.firstResult())
 anAngleVal.setValue(ANGLE_DEGREE)
+aConstraint.execute()
+aSession.finishOperation()
+aSession.startOperation()
 aFlyoutPoint = geomDataAPI_Point2D(aConstraint.attribute("ConstraintFlyoutValuePnt"))
 aFlyoutPoint.setValue(50.0, 100.0)
-aConstraint.execute()
 aSession.finishOperation()
+aSession.abortOperation()
 assert (anAngleVal.isInitialized())
 assert (refattrA.isInitialized())
 assert (refattrB.isInitialized())