Salome HOME
Updated copyright comment
[modules/shaper.git] / test.API / SHAPER / Primitives / TestAPI_Cylinder.py
index f6862ab88afd2c3c536fd2a1adfff58ad94b684c..c90254ae259aa7a4fad9a78a3d6b1eddba31e776 100644 (file)
@@ -1,22 +1,21 @@
-## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
-##
-## This library is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## This library is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## See http:##www.salome-platform.org/ or
-## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
-##
+# Copyright (C) 2014-2024  CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy
 from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept
@@ -46,32 +45,32 @@ Cylinder_3 = shaperpy.makeCylinder(pnt2, edg1, 7., 12.)
 
 try:
   Cylinder_4 = shaperpy.makeCylinder(0., 10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: radius is negative or null.")
 
 try:
   Cylinder_5 = shaperpy.makeCylinder(-5., 10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: radius is negative or null.")
 
 try:
   Cylinder_6 = shaperpy.makeCylinder(5., 0.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: height is negative or null.")
 
 try:
   Cylinder_7 = shaperpy.makeCylinder(5., -10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: height is negative or null.")
 
 try:
   Cylinder_8 = shaperpy.makeCylinder(None, edgz, 5., 10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: the base point is not valid.")
 
 try:
   Cylinder_9 = shaperpy.makeCylinder(pnt1, None, 5., 10.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: the axis is not valid.")
 
 Cylinder_14 = shaperpy.makeCylinder(5., 10., 45.)
@@ -81,45 +80,45 @@ Cylinder_17 = shaperpy.makeCylinder(pnt2, edgy, 5., 10., 360.)
 
 try:
   Cylinder_18 = shaperpy.makeCylinder(0., 10., 45.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: radius is negative or null.")
 
 try:
   Cylinder_19 = shaperpy.makeCylinder(-5., 10., 45.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: radius is negative or null.")
 
 try:
   Cylinder_20 = shaperpy.makeCylinder(5., 0., 45.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: height is negative or null.")
 
 try:
   Cylinder_21 = shaperpy.makeCylinder(5., -10., 45.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: height is negative or null.")
 
 try:
   Cylinder_22 = shaperpy.makeCylinder(5., 10., 0.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: angle is negative or null.")
 
 try:
   Cylinder_23 = shaperpy.makeCylinder(5., 10., -45.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: angle is negative or null.")
 
 try:
   Cylinder_24 = shaperpy.makeCylinder(5., 10., 450.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: angle greater than 360 degrees.")
 
 try:
   Cylinder_25 = shaperpy.makeCylinder(None, edgz, 5., 10., 90.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: the base point is not valid.")
 
 try:
   Cylinder_26 = shaperpy.makeCylinder(pnt1, None, 5., 10., 90.)
-except myExcept,ec:
+except myExcept as ec:
   assert(ec.what() == "Cylinder builder :: the axis is not valid.")
\ No newline at end of file