From 63091ad05360a6cdec3bb3f2dc7033c97d9aba7d Mon Sep 17 00:00:00 2001 From: Clarisse Genrault Date: Fri, 29 Sep 2017 09:57:15 +0200 Subject: [PATCH] Updating tests for rotation. --- .../SHAPER/Transformations/TestRotation.py | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/test.API/SHAPER/Transformations/TestRotation.py b/test.API/SHAPER/Transformations/TestRotation.py index 7fad6c9ba..d078b73af 100644 --- a/test.API/SHAPER/Transformations/TestRotation.py +++ b/test.API/SHAPER/Transformations/TestRotation.py @@ -117,6 +117,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]) @@ -136,11 +148,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.') @@ -173,4 +187,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.') -- 2.39.2