X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FTest%2FTestUndoRedo.py;h=3981f30d4f257df0c4604ce52f1cdb38ceefd727;hb=f0cec241aae9ca16d86e166f45cb5c4987d2c792;hp=26f54acb57863f07827cc21a36449d08221d9668;hpb=979ad873ba8ebe5ec3c8e6eae08f359b94768766;p=modules%2Fshaper.git diff --git a/src/ModelAPI/Test/TestUndoRedo.py b/src/ModelAPI/Test/TestUndoRedo.py index 26f54acb5..3981f30d4 100644 --- a/src/ModelAPI/Test/TestUndoRedo.py +++ b/src/ModelAPI/Test/TestUndoRedo.py @@ -8,25 +8,30 @@ aSession.startOperation() aFeature = aDoc.addFeature("Point") # Since validators are introduced we have to initialize all # the feature's attributes +# aFeature.string("creation_method").setValue("by_xyz") aFeature.real("x").setValue(1.) aFeature.real("y").setValue(-1.) aFeature.real("z").setValue(0.) aFeatureName = aFeature.name() -assert(aFeatureName == "Point_1") +# "2" is because Origin is the first point +assert(aFeatureName == "Point_2") aFeature.execute() aSession.finishOperation() -assert(aDoc.size("Construction") == 1) +assert(aDoc.size("Construction") == 8) assert(aSession.canUndo()) assert(not aSession.canRedo()) aSession.undo() -assert(aDoc.size("Construction") == 0) +assert(aDoc.size("Construction") == 7) assert(not aSession.canUndo()) assert(aSession.canRedo()) aSession.redo() -assert(aDoc.size("Construction") == 1) +assert(aDoc.size("Construction") == 8) assert(aSession.canUndo()) assert(not aSession.canRedo()) + +import model +assert(model.checkPythonDump())