Salome HOME
Issue #803: Put all the python modules in the same python package newgeom
[modules/shaper.git] / src / FeaturesPlugin / Test / TestRecover.py
index f3afa4106e83ef0b8fed2eb3062303f4dd459808..ab1251a562e136dd2d8089f83ccbcf05c639e958 100644 (file)
@@ -1,7 +1,7 @@
 # Test made with high level API
 # -----------------------------
 
-import model
+from salome.shaper import model
 
 # Initialisation
 
@@ -23,14 +23,14 @@ c2 = sk2.addCircle(20, 30, 30)
 model.do()
 smallcyl = model.addExtrusion(mypart, sk2.selectFace(), 150)
 
-cut = model.addCut(mypart, bigcyl.result(), smallcyl.result())
+cut = model.addCut(mypart, bigcyl.results(), smallcyl.results())
 
 model.do()
 
 # check bodies number is 1: only Boolean result
 assert(mypart.size("Bodies") == 1)
 
-model.addRecover(mypart, cut, smallcyl.result())
+model.addRecover(mypart, cut, smallcyl.results())
 
 model.end()
 
@@ -45,27 +45,22 @@ assert(mypart.size("Bodies") == 1)
 
 # check persistent flag of recover: never concealed
 model.begin()
+recover = model.addRecover(mypart, cut, smallcyl.results())
+model.end()
 
-recover = model.addRecover(mypart, cut, smallcyl.result(), True)
 assert(mypart.size("Bodies") == 2)
+
+model.begin()
 sk3 = model.addSketch(mypart, model.defaultPlane("XOY"))
 c3 = sk3.addCircle(0, 0, 90)
 model.do()
 big2 = model.addExtrusion(mypart, sk3.selectFace(), 110)
 
-cut2 = model.addCut(mypart, big2.result(), smallcyl.result())
+cut2 = model.addCut(mypart, big2.results(), smallcyl.results())
 
 model.end()
 
 # two booleans and small cylinder
 assert(mypart.size("Bodies") == 3)
 
-
-# make the flag as not-persistent => cylinder must be disappeared
-model.begin()
-recover.setIsPersistent(False)
-model.end()
-# only two booleans
-assert(mypart.size("Bodies") == 2)
-
 assert(model.checkPythonDump())