From a902b9df56df2dcc7969f471a73d0f3fcc50d167 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 8 Jul 2016 15:46:27 +0300 Subject: [PATCH] Unit test for Int Array --- src/ModelAPI/CMakeLists.txt | 1 + src/ModelAPI/Test/TestIntArray.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 src/ModelAPI/Test/TestIntArray.py diff --git a/src/ModelAPI/CMakeLists.txt b/src/ModelAPI/CMakeLists.txt index 60036bc80..ef618a982 100644 --- a/src/ModelAPI/CMakeLists.txt +++ b/src/ModelAPI/CMakeLists.txt @@ -131,4 +131,5 @@ ADD_UNIT_TESTS(TestConstants.py TestDocument.py Test1064.py TestResults.py + TestIntArray.py Test1512.py) diff --git a/src/ModelAPI/Test/TestIntArray.py b/src/ModelAPI/Test/TestIntArray.py new file mode 100755 index 000000000..a52bbdd4a --- /dev/null +++ b/src/ModelAPI/Test/TestIntArray.py @@ -0,0 +1,30 @@ +""" + Test1064.py + Unit test for testing the Part sub-shapes naming, described in the issue 1064 + +""" +#========================================================================= +# Initialization of the test +#========================================================================= +from ModelAPI import * +from GeomDataAPI import * +from GeomAlgoAPI import * +from GeomAPI import * + +__updated__ = "2015-10-16" + +aSession = ModelAPI_Session.get() + +#========================================================================= +# Create a sketch triangle in PartSet +#========================================================================= +aPartSet = aSession.moduleDocument() +aSession.startOperation() +aSketchFeature = featureToCompositeFeature(aPartSet.addFeature("Sketch")) +anArray = aSketchFeature.data().addAttribute("IntArray_1", "IntArray") +anArray.setSize(5) +assert(anArra.size() == 5) + +#========================================================================= +# End of test +#========================================================================= -- 2.39.2