Salome HOME
Revert selection of compsolid in RemoveSubshapes feature
[modules/shaper.git] / src / FeaturesPlugin / Test / TestRemoveSubShapes5.py
index 310a650ff179cb24feb7c88bc42a41628bc48c82..ff3c8d8047b4ec10dfdc4f4ee7ec0158256c50f5 100644 (file)
@@ -55,6 +55,14 @@ Remove_SubShapes_1 = model.addRemoveSubShapes(Part_1_doc, model.selection("COMPO
 Remove_SubShapes_1.setSubShapesToRemove([model.selection("COMPSOLID", "Partition_1_1_1/Partition_1_1_1")])
 model.do()
 
+# check error when compsolid is selected
+assert(Remove_SubShapes_1.feature().error() != "")
+
+# fix the problematic feature
+Remove_SubShapes_1.setSubShapesToRemove([model.selection("SOLID", "Partition_1_1_1_1"), model.selection("SOLID", "Partition_1_1_1_2"), model.selection("SOLID", "Partition_1_1_1_3")])
+model.do()
+assert(Remove_SubShapes_1.feature().error() == "")
+
 # check number of sub-shapes
 model.testNbResults(Remove_SubShapes_1, 1)
 model.testNbSubResults(Remove_SubShapes_1, [2])