Salome HOME
Added the removeLast method into AttributeRefList
[modules/shaper.git] / src / ModelAPI / Test / TestDocument.py
index e0f7da4be1b910f394de5d1502248c4733531652..8080f3654ae3efc4ecf84c8842cdb5ccdae38728 100644 (file)
@@ -77,13 +77,14 @@ assert(aSession.moduleDocument().size("Parts") == 2)
 aSession.startOperation()
 aPart.addFeature("Remove")
 aSession.finishOperation()
+# First part is deleted, but active is Part_2, so, it is still active
 assert(aSession.moduleDocument().size("Parts") == 1)
-assert(aSession.activeDocument().id() == aSession.moduleDocument().id())
+assert(aSession.activeDocument().id() == aCopyOfPart.id())
 # Remove another one document
 aSession.startOperation()
-aDoc1 = aSession.document("Part_1")
-aSession.setActiveDocument(aDoc1, False)
-aDoc1.addFeature("Remove")
+aDoc2 = aSession.document("Part_2")
+aSession.setActiveDocument(aDoc2, False)
+aDoc2.addFeature("Remove")
 aSession.finishOperation()
 assert(aSession.moduleDocument().size("Parts") == 0)
 assert(aSession.activeDocument())