]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/Test/TestConstraintMirror.py
Salome HOME
Fix problems in sketch unit tests
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintMirror.py
index 30e8570f41d43859049d537079c851990be69ae9..25b7eeecb6c7cf97def16038767e34f3df2827c7 100644 (file)
@@ -202,5 +202,26 @@ checkMirror(aRefListB, aRefListC, aMirrorLine)
 # End of test
 #=========================================================================
 
+
+# make second line fixed
+aSession.startOperation()
+aFixed = aSketchFeature.addFeature("SketchConstraintRigid")
+aRefObjectA = aFixed.refattr("ConstraintEntityA")
+anObjectA = modelAPI_ResultConstruction(aSketchLine2.lastResult())
+assert (anObjectA is not None)
+aRefObjectA.setObject(anObjectA)
+aFixed.execute()
+aSession.finishOperation()
+# set mirror for first line to check dumping
+aSession.startOperation()
+aRefListInitial.clear()
+assert (aRefListB.size() == 0)
+assert (aRefListC.size() == 0)
+aRefListInitial.append(aSketchLine1.lastResult())
+aSession.finishOperation()
+assert (aRefListB.size() == 1)
+assert (aRefListC.size() == 1)
+checkMirror(aRefListB, aRefListC, aMirrorLine)
+
 import model
 assert(model.checkPythonDump())