From: azv Date: Wed, 17 Jan 2018 09:24:19 +0000 (+0300) Subject: testHaveNamingSubshapes: Do not create a group if there is no objects of specified... X-Git-Tag: V_3.0.0RC1~25^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c1aba245957ea388718557b9be063d1c92cbf5f;p=modules%2Fshaper.git testHaveNamingSubshapes: Do not create a group if there is no objects of specified type --- diff --git a/src/PythonAPI/model/tests/tests.py b/src/PythonAPI/model/tests/tests.py index 6c6d8e899..ff7ce4ddd 100644 --- a/src/PythonAPI/model/tests/tests.py +++ b/src/PythonAPI/model/tests/tests.py @@ -238,6 +238,9 @@ def testHaveNamingByType(theFeature, theModel, thePartDoc, theSubshapeType) : selectionList.append(selection) shapeExplorer.next() # Create group with this selection list + # (do not create group if nothing is selected) + if (len(selectionList) == 0): + return Group_1 = theModel.addGroup(thePartDoc, selectionList) theModel.do()