]> SALOME platform Git repositories - modules/shaper.git/blobdiff - test.API/SHAPER/Primitives/TestAPI_Box.py
Salome HOME
Porting to SALOME 9.1.0.
[modules/shaper.git] / test.API / SHAPER / Primitives / TestAPI_Box.py
index 8b24b80494b19cbff63c8b7ccf78e17e55d01a26..8ea9d29dc2ac578474ef6a5b76d1f3b048398bc8 100644 (file)
@@ -27,32 +27,32 @@ Box_1 = shaperpy.makeBox(10.,10.,10.)
 
 try :
   Box_2 = shaperpy.makeBox(0.,10.,10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dx is null or negative.")
 
 try :
   Box_3 = shaperpy.makeBox(10.,0.,10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dy is null or negative.")
 
 try :
   Box_4 = shaperpy.makeBox(10.,10.,0.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dz is null or negative.")
 
 try :
   Box_5 = shaperpy.makeBox(-10.,10.,10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dx is null or negative.")
 
 try :
   Box_6 = shaperpy.makeBox(10.,-10.,10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dy is null or negative.")
 
 try :
   Box_7 = shaperpy.makeBox(10.,10.,-10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with dimensions :: Dz is null or negative.")
 
 # Create a box with two points defining the diagonal
@@ -62,33 +62,33 @@ Box_8 = shaperpy.makeBox(pnt1,pnt2)
 
 try :
   Box_9 = shaperpy.makeBox(pnt1,pnt1)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the distance between the two points is null.")
 
 try :
   pnt3 = pnt(0.,50.,50.)
   Box_10 = shaperpy.makeBox(pnt1,pnt3)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the points belong both to one of the OXY, OYZ or OZX planes.")
 
 try :
   pnt4 = pnt(50.,0.,50.)
   Box_11 = shaperpy.makeBox(pnt1,pnt4)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the points belong both to one of the OXY, OYZ or OZX planes.")
 
 try :
   pnt5 = pnt(50.,50.,0.)
   Box_12 = shaperpy.makeBox(pnt1,pnt5)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the points belong both to one of the OXY, OYZ or OZX planes.")
 
 try :
   Box_13 = shaperpy.makeBox(None, pnt2)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the first point is not valid.")
 
 try :
   Box_14 = shaperpy.makeBox(pnt2, None)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Box builder with points :: the second point is not valid.")
\ No newline at end of file