Salome HOME
Issue #2561: CEA 2018-1 Cut
[modules/shaper.git] / src / PythonAPI / model / tests / tests.py
index 7cd30c2caa43552c4f5989e5430070f6734a9da9..921abf09a88dd17331ff83b9729f3050476881c3 100644 (file)
@@ -203,6 +203,8 @@ def testHaveNamingByType(theFeature, theModel, thePartDoc, theSubshapeType) :
   :param theFeature: feature to test.
   :param theSubshapeType: type of sub-shape
   """
+  if not theFeature.results():
+    return
   aFirstRes = theFeature.results()[0]
   # Get number of sub-results
   hasSubs = True