From: azv Date: Thu, 20 Dec 2018 08:14:16 +0000 (+0300) Subject: [Code coverage GeomAlgoAPI]: Check errors in MultiTranslation X-Git-Tag: End2018~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6ab65ab47204ce7bd286067a0d5251102ca7ba44;p=modules%2Fshaper.git [Code coverage GeomAlgoAPI]: Check errors in MultiTranslation --- diff --git a/test.API/SHAPER/Transformations/TestAPI_MultiTranslation.py b/test.API/SHAPER/Transformations/TestAPI_MultiTranslation.py index 0a3ac7619..4b40b018c 100644 --- a/test.API/SHAPER/Transformations/TestAPI_MultiTranslation.py +++ b/test.API/SHAPER/Transformations/TestAPI_MultiTranslation.py @@ -58,18 +58,27 @@ MultiTranslation_5 = shaperpy.makeMultiTranslation(Box_5, ax1, 10., 5, ax2, 10., MultiTranslation_6 = shaperpy.makeMultiTranslation(Box_6, ax1, 15., 5, ax2, -10., 5) # Tests en erreur -#try: -# MultiTranslation_4 = shaperpy.makeMultiTranslation(Box_4, None, 15., 2) -#except myExcept,ec: -# assert(ec.what() == "Multitranslation builder :: the first axis is not valid.") +try: + MultiTranslation_4 = shaperpy.makeMultiTranslation(Box_4, None, 15., 2) +except myExcept as ec: + assert(ec.what() == "Multitranslation builder :: the first axis is not valid") # Pas d'exception levee alors qu'une devrait y en avoir une try: MultiTranslation_7 = shaperpy.makeMultiTranslation(Box_7, ax1, 15., 5, ax2, 10., -2) except myExcept as ec: assert(ec.what() == "Multitranslation builder :: the number of copies for the second direction is null or negative.") +try: + MultiTranslation_8 = shaperpy.makeMultiTranslation(Box_7, ax1, 15., -2, ax2, 10., 5) +except myExcept as ec: + assert(ec.what() == "Multitranslation builder :: the number of copies for the first direction is null or negative.") -#try: -# MultiTranslation_8 = shaperpy.makeMultiTranslation(Box_8, ax1, 15., 5, None, 10., 5) -#except myExcept,ec: -# assert(ec.what() == "Multitranslation builder :: the second axis is not valid.") +try: + MultiTranslation_9 = shaperpy.makeMultiTranslation(Box_8, None, 15., 5, ax2, 10., 5) +except myExcept as ec: + assert(ec.what() == "Multitranslation builder :: the first axis is not valid") + +try: + MultiTranslation_10 = shaperpy.makeMultiTranslation(Box_8, ax1, 15., 5, None, 10., 5) +except myExcept as ec: + assert(ec.what() == "Multitranslation builder :: the second axis is not valid")