From 0c1aba245957ea388718557b9be063d1c92cbf5f Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 17 Jan 2018 12:24:19 +0300 Subject: [PATCH] testHaveNamingSubshapes: Do not create a group if there is no objects of specified type --- src/PythonAPI/model/tests/tests.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- 2.39.2