X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FTest%2FTestUndoRedo.py;h=b9701a1b9639fe0e3a627af6be6dc563bcfd0d36;hb=9b44b38c6a5199172aa2c4d2297954e170ac4308;hp=26f54acb57863f07827cc21a36449d08221d9668;hpb=758a57d77b6fa3a0485fa3378a1280c7e87a74aa;p=modules%2Fshaper.git diff --git a/src/ModelAPI/Test/TestUndoRedo.py b/src/ModelAPI/Test/TestUndoRedo.py index 26f54acb5..b9701a1b9 100644 --- a/src/ModelAPI/Test/TestUndoRedo.py +++ b/src/ModelAPI/Test/TestUndoRedo.py @@ -8,25 +8,27 @@ 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())