Salome HOME
test
[modules/shaper.git] / src / PythonAddons / Test / TestmidSurface.py
index af9c13276adb2598ba24353512581d2d0331a778..77c56a38d08f25057d6ee7337ad2c4620c5ffc06 100755 (executable)
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-"""Test de la création de surfaces médianes"""
 
-__revision__ = "V01.03"
+from salome.shaper import model
+from ModelAPI import *
 
 import os
 
-from ModelAPI import *
-
 aSession = ModelAPI_Session.get()
 
 def getFilePath(fileName):
-    """Le fichier décrivant l'objet"""
     path = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "midSurface")
     return os.path.join(path, fileName)
 
@@ -46,6 +43,10 @@ aFile = anImportFeature.string(aFieldName)
 aFile.setValue(theFile)
 aSession.finishOperation()
 
-#print ("Nombre de dossiers : {}".format(aPart.size("Folders")))
+#for cle in ("Bodies", "Groups", "Construction", "Folders"):
+  #print (cle,":",aPart.size(cle))
 
-assert(aPart.size("Folders") == 1), "Wrong number of folders: {}".format(aPart.size("Folders"))
+assert(aPart.size("Bodies") == 8), "Right number of construction: {}".format(aPart.size("Bodies"))
+assert(aPart.size("Construction") == 7), "Right number of construction: {}".format(aPart.size("Construction"))
+assert(aPart.size("Groups") == 2), "Right number of construction: {}".format(aPart.size("Groups"))
+assert(aPart.size("Folders") == 4), "Wrong number of folders: {}".format(aPart.size("Folders"))