]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update unit test for changing default color
authorazv <azv@opencascade.com>
Mon, 22 Aug 2016 08:47:25 +0000 (11:47 +0300)
committerazv <azv@opencascade.com>
Mon, 22 Aug 2016 08:47:25 +0000 (11:47 +0300)
src/ModelAPI/Test/TestResults.py

index b74b29e7efeb22cfe86592ee022bef8efaa44134..b7e928d57d2d76372b39e2d03968b03303f7e51c 100755 (executable)
@@ -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