From d32b7de5f466bcf611537140d7410c2b5c151c3c Mon Sep 17 00:00:00 2001 From: dbv Date: Mon, 27 Nov 2017 20:14:13 +0300 Subject: [PATCH] Tests fix. --- src/FeaturesPlugin/Test/TestRemoveSubShapes.py | 3 ++- src/ModelAPI/Test/Test2228.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/FeaturesPlugin/Test/TestRemoveSubShapes.py b/src/FeaturesPlugin/Test/TestRemoveSubShapes.py index a94dcee60..9a10cfab5 100644 --- a/src/FeaturesPlugin/Test/TestRemoveSubShapes.py +++ b/src/FeaturesPlugin/Test/TestRemoveSubShapes.py @@ -87,7 +87,8 @@ anExtrusionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(anExtrusionFeat aSession.startOperation() aRemoveSubShapesFeature = aPart.addFeature("Remove_SubShapes") aRemoveSubShapesFeature.selection("base_shape").setValue(anExtrusionResult, None) -aRemoveSubShapesFeature.selectionList("subshapes").removeLast(); +aRemoveSubShapesFeature.string("creation_method").setValue("by_keep_subshapes") +aRemoveSubShapesFeature.selectionList("subshapes_to_keep").removeLast(); aSession.finishOperation() assert (len(aRemoveSubShapesFeature.results()) > 0) anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult())) diff --git a/src/ModelAPI/Test/Test2228.py b/src/ModelAPI/Test/Test2228.py index 3b4f0a032..0926071b4 100644 --- a/src/ModelAPI/Test/Test2228.py +++ b/src/ModelAPI/Test/Test2228.py @@ -67,5 +67,5 @@ model.end() from ModelAPI import * aFactory = ModelAPI_Session.get().validators() assert(aFactory.validate(Remove_SubShapes_1.feature())) -assert(Remove_SubShapes_1.subshapes().size() == 1) -assert(Remove_SubShapes_1.subshapes().value(0).namingName() == "Partition_1_1_1") +assert(Remove_SubShapes_1.subshapesToKeep().size() == 1) +assert(Remove_SubShapes_1.subshapesToKeep().value(0).namingName() == "Partition_1_1_1") -- 2.39.2