From: azv Date: Mon, 22 Aug 2016 08:47:25 +0000 (+0300) Subject: Update unit test for changing default color X-Git-Tag: V_2.5.0~137^2~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f444887be96f1a23487c76e623144c9473fa6cb;p=modules%2Fshaper.git Update unit test for changing default color --- diff --git a/src/ModelAPI/Test/TestResults.py b/src/ModelAPI/Test/TestResults.py index b74b29e7e..b7e928d57 100755 --- a/src/ModelAPI/Test/TestResults.py +++ b/src/ModelAPI/Test/TestResults.py @@ -17,9 +17,17 @@ aSession = ModelAPI_Session.get() #========================================================================= aPartSet = aSession.moduleDocument() aSession.startOperation() -aPlaneX = aPartSet.objectByName("Construction", "YOZ"); +aPlaneX = aPartSet.addFeature("Plane") +aPlaneX.string("creation_method").setValue("by_general_equation") +aPlaneX.real("A").setValue(1.) +aPlaneX.real("B").setValue(0.) +aPlaneX.real("C").setValue(0.) +aPlaneX.real("D").setValue(0.) assert(aPlaneX) -aColors = aPlaneX.data().intArray("Color") +aSession.finishOperation() + +aSession.startOperation() +aColors = aPlaneX.lastResult().data().intArray("Color") assert(aColors) # default colors, not filled array assert(aColors.size() == 0) @@ -31,7 +39,6 @@ assert(aColors.size() == 3) assert(aColors.value(0) == 100) assert(aColors.value(1) == 200) assert(aColors.value(2) == 250) - aSession.finishOperation() import model