From 734fbf40768ec7daf48d6832e107fd049d2cef3e Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 26 Nov 2019 16:58:15 +0300 Subject: [PATCH] Fix the test because path-objects of pipe can not be reused anymore (issue #18352) --- src/FeaturesPlugin/Test/TestPipe.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FeaturesPlugin/Test/TestPipe.py b/src/FeaturesPlugin/Test/TestPipe.py index e0718b888..fa9939162 100644 --- a/src/FeaturesPlugin/Test/TestPipe.py +++ b/src/FeaturesPlugin/Test/TestPipe.py @@ -127,15 +127,16 @@ aBaseObject = aRecover.reference("base_feature") aBaseObject.setValue(aPipeFeature) aRecoveredObjects = aRecover.reflist("recovered") aRecoveredObjects.append(aFaceResult1) +aRecoveredObjects.append(aWireResult) aSession.finishOperation() # Create pipe with bi-normal aSession.startOperation() aPipeFeature = aPart.addFeature("Pipe") aBaseObjectsList = aPipeFeature.selectionList("base_objects") -aBaseObjectsList.append(aRecover.firstResult(), None) +aBaseObjectsList.append(aRecover.lastResult(), None) aPathObjectSelection = aPipeFeature.selection("path_object") -aPathObjectSelection.setValue(aWireResult, None) +aPathObjectSelection.setValue(aRecover.firstResult(), None) aPipeFeature.string("creation_method").setValue("binormal") aBinormalObjectSelection = aPipeFeature.selection("binormal") aShapeExplorer = GeomAPI_ShapeExplorer(aSketchShape, GeomAPI_Shape.EDGE) @@ -153,6 +154,7 @@ aBaseObject = aRecover2.reference("base_feature") aBaseObject.setValue(aPipeFeature) aRecoveredObjects = aRecover2.reflist("recovered") aRecoveredObjects.append(aRecover.firstResult()) +aRecoveredObjects.append(aRecover.lastResult()) aSession.finishOperation() # Create pipe with locations @@ -193,7 +195,7 @@ aBaseObjectsList = aPipeFeature.selectionList("base_objects") aBaseObjectsList.append(aRecover2.firstResult(), None) aBaseObjectsList.append(aFaceResult2, None) aPathObjectSelection = aPipeFeature.selection("path_object") -aPathObjectSelection.setValue(aWireResult, None) +aPathObjectSelection.setValue(aRecover2.lastResult(), None) aPipeFeature.string("creation_method").setValue("locations") aSession.finishOperation() -- 2.39.2