Salome HOME
Tests fix.
authordbv <dbv@opencascade.com>
Mon, 1 Aug 2016 12:57:45 +0000 (15:57 +0300)
committerdbv <dbv@opencascade.com>
Mon, 1 Aug 2016 12:57:45 +0000 (15:57 +0300)
src/ConstructionPlugin/Test/TestAxisCreation.py
src/ConstructionPlugin/Test/TestPoint.py
src/ConstructionPlugin/Test/TestPointName.py
src/ModelAPI/Test/TestUndoRedo.py
src/PrimitivesPlugin/Test/UnitTestBox.py
src/SketchPlugin/Test/TestConstraintCoincidence.py
src/SketchPlugin/Test/TestConstraintMiddlePoint.py

index 35885a872134c6090ef1e64ff3ee1cc1f68319f4..def1153d33471f664b54cb173797fae7fdcdb4d7 100644 (file)
@@ -26,7 +26,7 @@ aSession.startOperation()
 aPointFeature = aPart.addFeature("Point")
 aPointFeatureData = aPointFeature.data()
 assert(aPointFeatureData is not None)
-aPointFeatureData.string("creation_method").setValue("by_xyz")
+aPointFeatureData.string("creation_method").setValue("by_xyz")
 aPointFeatureData.real("x").setValue(0.)
 aPointFeatureData.real("y").setValue(0.)
 aPointFeatureData.real("z").setValue(0.)
@@ -41,7 +41,7 @@ aSession.startOperation()
 aPointFeature = aPart.addFeature("Point")
 aPointFeatureData = aPointFeature.data()
 assert(aPointFeatureData is not None)
-aPointFeatureData.string("creation_method").setValue("by_xyz")
+aPointFeatureData.string("creation_method").setValue("by_xyz")
 aPointFeatureData.real("x").setValue(0.)
 aPointFeatureData.real("y").setValue(0.)
 aPointFeatureData.real("z").setValue(100.)
index e5a067323f229737e23caa658a5e1e7523655480..5ea7e780b5287d5c07b447730db0ecb09ce1bf7c 100644 (file)
@@ -22,41 +22,41 @@ aPoint = model.addPoint(aDocument, 50, 50, 50)
 aSession.finishOperation()
 assert (len(aPoint.result()) > 0)
 
-# Create a sketch with lines
-aSession.startOperation()
-anOrigin = GeomAPI_Pnt(0, 0, 0)
-aDirX = GeomAPI_Dir(1, 0, 0)
-aNorm = GeomAPI_Dir(0, 0, 1)
-aSketch = model.addSketch(aDocument, GeomAPI_Ax3(anOrigin, aDirX, aNorm))
-aSketchLine1 = aSketch.addLine(0, 0, 100, 100)
-aSketchLine2 = aSketch.addLine(0, 100, 100, 0)
-aSession.finishOperation()
-
-# Create a point on line
-aSession.startOperation()
-aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], 25, True, False)
-aSession.finishOperation()
-assert (len(aPoint.result()) > 0)
-
-# Create plane
-aSession.startOperation()
-aPlane = model.addPlane(aDocument, 1, 1, 1, 1)
-aSession.finishOperation()
-
-# Create a point by projection
-aSession.startOperation()
-aPoint = model.addPoint(aDocument, aPoint.result()[0], aPlane.result()[0])
-aSession.finishOperation()
-assert (len(aPoint.result()) > 0)
-
-# Create a point by lines intersection
-aSession.startOperation()
-aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], aSketchLine2.result()[0])
-aSession.finishOperation()
-assert (len(aPoint.result()) > 0)
-
-# Create a point by line and plane intersection
-aSession.startOperation()
-aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], aPlane.result()[0])
-aSession.finishOperation()
-assert (len(aPoint.result()) > 0)
+# Create a sketch with lines
+aSession.startOperation()
+anOrigin = GeomAPI_Pnt(0, 0, 0)
+aDirX = GeomAPI_Dir(1, 0, 0)
+aNorm = GeomAPI_Dir(0, 0, 1)
+aSketch = model.addSketch(aDocument, GeomAPI_Ax3(anOrigin, aDirX, aNorm))
+aSketchLine1 = aSketch.addLine(0, 0, 100, 100)
+aSketchLine2 = aSketch.addLine(0, 100, 100, 0)
+aSession.finishOperation()
+#
+# Create a point on line
+aSession.startOperation()
+aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], 25, True, False)
+aSession.finishOperation()
+assert (len(aPoint.result()) > 0)
+#
+# Create plane
+aSession.startOperation()
+aPlane = model.addPlane(aDocument, 1, 1, 1, 1)
+aSession.finishOperation()
+#
+# Create a point by projection
+aSession.startOperation()
+aPoint = model.addPoint(aDocument, aPoint.result()[0], aPlane.result()[0])
+aSession.finishOperation()
+assert (len(aPoint.result()) > 0)
+#
+# Create a point by lines intersection
+aSession.startOperation()
+aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], aSketchLine2.result()[0])
+aSession.finishOperation()
+assert (len(aPoint.result()) > 0)
+#
+# Create a point by line and plane intersection
+aSession.startOperation()
+aPoint = model.addPoint(aDocument, aSketchLine1.result()[0], aPlane.result()[0])
+aSession.finishOperation()
+assert (len(aPoint.result()) > 0)
index 274c931b29f8ea1514fce4de2da8663177b422e0..fcf606b054c6a19baaf45a188115f1c1f11a77eb 100644 (file)
@@ -7,7 +7,7 @@ aSession.startOperation()
 aFeature = aDoc.addFeature("Point")
 aFeatureData = aFeature.data()
 assert(aFeatureData is not None)
-aFeatureData.string("creation_method").setValue("by_xyz")
+aFeatureData.string("creation_method").setValue("by_xyz")
 aFeatureData.real("x").setValue(0.)
 aFeatureData.real("y").setValue(0.)
 aFeatureData.real("z").setValue(0.)
index b9701a1b9639fe0e3a627af6be6dc563bcfd0d36..2f86fbefc8f45719d2f9b421f5eee433153a5a46 100644 (file)
@@ -8,7 +8,7 @@ aSession.startOperation()
 aFeature = aDoc.addFeature("Point")\r
 # Since validators are introduced we have to initialize all\r
 # the feature's attributes\r
-aFeature.string("creation_method").setValue("by_xyz")\r
+aFeature.string("creation_method").setValue("by_xyz")\r
 aFeature.real("x").setValue(1.)\r
 aFeature.real("y").setValue(-1.)\r
 aFeature.real("z").setValue(0.)\r
index a5458b54a3169dd6aae8749d62b96fcf10cf3e82..ebbac5509d61b44466fe2068635ecf87ec638811 100644 (file)
@@ -98,11 +98,11 @@ aPoint1 = aPart.addFeature("Point")
 aPoint2 = aPart.addFeature("Point")
 assert(aPoint1.getKind() == "Point")
 assert(aPoint2.getKind() == "Point")
-aPoint1.string("creation_method").setValue("by_xyz")
+aPoint1.string("creation_method").setValue("by_xyz")
 aPoint1.real("x").setValue(2.0)
 aPoint1.real("y").setValue(2.0)
 aPoint1.real("z").setValue(2.0)
-aPoint2.string("creation_method").setValue("by_xyz")
+aPoint2.string("creation_method").setValue("by_xyz")
 aPoint2.real("x").setValue(2.5)
 aPoint2.real("y").setValue(2.5)
 aPoint2.real("z").setValue(2.5)
index c7ba672dacf33e0a5bddb32dcda1f3d48a8d598a..e37159af8b89bbb8683d0d2a8235e344206ecebb 100644 (file)
@@ -61,7 +61,7 @@ aDocument = aSession.moduleDocument()
 # add an origin
 aSession.startOperation()
 aFeature = aDocument.addFeature("Point")
-aFeature.string("creation_method").setValue("by_xyz")
+aFeature.string("creation_method").setValue("by_xyz")
 aFeature.real("x").setValue(0.)
 aFeature.real("y").setValue(0.)
 aFeature.real("z").setValue(0.)
index 42e2138934bb041114c57dea6fe09ff36b5b4aeb..80ef018179857a148b2943eab474b3a24fc0567f 100644 (file)
@@ -45,7 +45,7 @@ aDocument = aSession.moduleDocument()
 # add an origin
 aSession.startOperation()
 aFeature = aDocument.addFeature("Point")
-aFeature.string("creation_method").setValue("by_xyz")
+aFeature.string("creation_method").setValue("by_xyz")
 aFeature.real("x").setValue(0.)
 aFeature.real("y").setValue(0.)
 aFeature.real("z").setValue(0.)