From: dbv Date: Fri, 29 May 2015 16:07:58 +0000 (+0300) Subject: Tests fix X-Git-Tag: V_1.2.0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=905c82dbe31d4fe6fce332cb9a7163c86448ba8f;p=modules%2Fshaper.git Tests fix --- diff --git a/src/FeaturesPlugin/Test/TestBoolean.py b/src/FeaturesPlugin/Test/TestBoolean.py index 657a504d2..9393bee87 100644 --- a/src/FeaturesPlugin/Test/TestBoolean.py +++ b/src/FeaturesPlugin/Test/TestBoolean.py @@ -102,8 +102,8 @@ aSession.finishOperation() #========================================================================= aSession.startOperation() aBooleanFt = aPart.addFeature("Boolean") -aBooleanFt.reference("main_object").setValue(extrudedObjects[0]) -aBooleanFt.reference("tool_object").setValue(extrudedObjects[1]) +aBooleanFt.selectionList("main_objects").append(extrudedObjects[0], extrudedObjects[0].shape()) +aBooleanFt.selectionList("tool_objects").append(extrudedObjects[1], extrudedObjects[1].shape()) kBooleanTypeCut = 0 aBooleanFt.integer("bool_type").setValue(kBooleanTypeCut) aBooleanFt.execute() diff --git a/src/FeaturesPlugin/Test/TestMultiBoolean.py b/src/FeaturesPlugin/Test/TestMultiBoolean.py index eb15549c1..bb185acb6 100644 --- a/src/FeaturesPlugin/Test/TestMultiBoolean.py +++ b/src/FeaturesPlugin/Test/TestMultiBoolean.py @@ -166,16 +166,17 @@ aSession.finishOperation() # Create a boolean cut of cylinders from the box: # result of Boolean is the first argument of the next Boolean #========================================================================= -aCurrentResult = aBox.firstResult() +aCurrentResult = modelAPI_ResultBody(aBox.firstResult()) aSession.startOperation() for i in xrange(0, N * N): + anExtrusionResult = modelAPI_ResultBody(anExtrusions[i].firstResult()) aBooleanFt = aPart.addFeature("Boolean") - aBooleanFt.reference("main_object").setValue(modelAPI_ResultBody(aCurrentResult)) - aBooleanFt.reference("tool_object").setValue(modelAPI_ResultBody(anExtrusions[i].firstResult())) + aBooleanFt.selectionList("main_objects").append(aCurrentResult, aCurrentResult.shape()) + aBooleanFt.selectionList("tool_objects").append(anExtrusionResult, anExtrusionResult.shape()) kBooleanTypeCut = 0 aBooleanFt.integer("bool_type").setValue(kBooleanTypeCut) aBooleanFt.execute() - aCurrentResult = aBooleanFt.firstResult() + aCurrentResult = modelAPI_ResultBody(aBooleanFt.firstResult()) aSession.finishOperation() #=========================================================================