-# activate the Part of session
-model.begin()
-partSet = model.moduleDocument()
-assert(partSet.size("Features") == 2)
-aPart = objectToFeature(partSet.object("Features", 0))
-aPartResult = modelAPI_ResultPart(aPart.results()[0])
-aPartResult.activate()
-aPartDoc = aPartResult.partDoc()
-aSession.setActiveDocument(aPartDoc, True)
-model.do()
-# check the field result data
-aFieldFeature = aPartDoc.objectByName("Features", "Field_1")
-aFieldResult = modelAPI_ResultField(objectToFeature(aFieldFeature).results()[0])
-assert(aFieldResult.textLine(0) == "5")
-aSession.setActiveDocument(partSet, True)
-model.do()
-aTranslation = objectToFeature(partSet.objectByName("Features", "Translation_1"))
-partSet.setCurrentFeature(aTranslation, True)
-model.end()
+ # activate the Part of session
+ model.begin()
+ partSet = model.moduleDocument()
+ assert(partSet.size("Features") == 2)
+ aPart = objectToFeature(partSet.object("Features", 0))
+ aPartResult = modelAPI_ResultPart(aPart.results()[0])
+ aPartResult.activate()
+ aPartDoc = aPartResult.partDoc()
+ aSession.setActiveDocument(aPartDoc, True)
+ model.do()
+ # check the field result data
+ aFieldFeature = aPartDoc.objectByName("Features", "Field_1")
+ aFieldResult = modelAPI_ResultField(objectToFeature(aFieldFeature).results()[0])
+ assert(aFieldResult.textLine(0) == "5")
+ aSession.setActiveDocument(partSet, True)
+ model.do()
+ aTranslation = objectToFeature(partSet.objectByName("Features", "Translation_1"))
+ partSet.setCurrentFeature(aTranslation, True)
+ model.end()