From 905c82dbe31d4fe6fce332cb9a7163c86448ba8f Mon Sep 17 00:00:00 2001 From: dbv Date: Fri, 29 May 2015 19:07:58 +0300 Subject: [PATCH] Tests fix --- src/FeaturesPlugin/Test/TestBoolean.py | 4 ++-- src/FeaturesPlugin/Test/TestMultiBoolean.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) 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() #========================================================================= -- 2.39.2