X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test.API%2FSHAPER%2FTransformations%2FTestRotation.py;h=b7343407fe2a363d9cc5fa360337de226bcca012;hb=97917d3698f5a2f7fc9596e7c755ff8f6751e373;hp=3af1988cc039df9e67a08fca2ac2ad5642e2c18b;hpb=a2ab2dc339b560c7309540e1f10b6ad60e5ed0af;p=modules%2Fshaper.git diff --git a/test.API/SHAPER/Transformations/TestRotation.py b/test.API/SHAPER/Transformations/TestRotation.py index 3af1988cc..b7343407f 100644 --- a/test.API/SHAPER/Transformations/TestRotation.py +++ b/test.API/SHAPER/Transformations/TestRotation.py @@ -1,5 +1,24 @@ +# Copyright (C) 2014-2019 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 +# + """ -Test case for Rotation feature. +Test case for Rotation feature. Written on High API. """ from salome.shaper import model @@ -97,6 +116,18 @@ model.testNbSubShapes(Rotation_4, GeomAPI_Shape.SOLID, [1]) model.testNbSubShapes(Rotation_4, GeomAPI_Shape.FACE, [6]) model.testHaveNamingFaces(Rotation_4, model, Part_1_doc) +model.testNbResults(Rotation_5, 1) +model.testNbSubResults(Rotation_5, [0]) +model.testNbSubShapes(Rotation_5, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Rotation_5, GeomAPI_Shape.FACE, [6]) +model.testHaveNamingFaces(Rotation_5, model, Part_1_doc) + +model.testNbResults(Rotation_6, 1) +model.testNbSubResults(Rotation_6, [0]) +model.testNbSubShapes(Rotation_6, GeomAPI_Shape.SOLID, [1]) +model.testNbSubShapes(Rotation_6, GeomAPI_Shape.FACE, [6]) +model.testHaveNamingFaces(Rotation_6, model, Part_1_doc) + model.testNbResults(Rotation_9, 1) model.testNbSubResults(Rotation_9, [0]) model.testNbSubShapes(Rotation_9, GeomAPI_Shape.SOLID, [1]) @@ -116,11 +147,13 @@ model.testNbResults(Rotation_19, 1) model.testNbSubResults(Rotation_19, [0]) -model.testNbResults(Rotation_5, 0) -assert(Rotation_5.feature().error() == 'Rotation builder :: angle greater than 360 degrees.') +# This test is OK because we accept angles greater than 360 +#model.testNbResults(Rotation_5, 0) +#assert(Rotation_5.feature().error() == 'Rotation builder :: angle greater than 360 degrees.') -model.testNbResults(Rotation_6, 0) -assert(Rotation_6.feature().error() == 'Rotation builder :: angle smaller than -360 degrees.') +# This test is OK because we accept angles smaller than 360 +#model.testNbResults(Rotation_6, 0) +#assert(Rotation_6.feature().error() == 'Rotation builder :: angle smaller than -360 degrees.') model.testNbResults(Rotation_7, 0) assert(Rotation_7.feature().error() == 'Attribute "axis_object" is not initialized.') @@ -153,4 +186,4 @@ assert(Rotation_16.feature().error() == 'Attribute "start_point" is not initiali #assert(Rotation_8.feature().error() == 'Attribute "main_object" is not initialized.') #model.testNbResults(Rotation_17, 0) -#assert(Rotation_17.feature().error() == 'Attribute "main_object" is not initialized.') \ No newline at end of file +#assert(Rotation_17.feature().error() == 'Attribute "main_object" is not initialized.')