From a3000c5358f3f0ef937ac637d382836808c3ac4a Mon Sep 17 00:00:00 2001 From: dbv Date: Mon, 14 Sep 2015 12:15:01 +0300 Subject: [PATCH] Tests update --- src/FeaturesPlugin/Test/TestExtrusionCut.py | 2 ++ src/FeaturesPlugin/Test/TestExtrusionFuse.py | 2 ++ src/FeaturesPlugin/Test/TestExtrusionSketch.py | 4 ++++ src/FeaturesPlugin/Test/TestRevolutionCut.py | 2 ++ src/FeaturesPlugin/Test/TestRevolutionFuse.py | 2 ++ src/FeaturesPlugin/Test/TestRevolutionSketch.py | 4 ++++ 6 files changed, 16 insertions(+) diff --git a/src/FeaturesPlugin/Test/TestExtrusionCut.py b/src/FeaturesPlugin/Test/TestExtrusionCut.py index 9c17d56d0..5a4d6ca53 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionCut.py +++ b/src/FeaturesPlugin/Test/TestExtrusionCut.py @@ -121,6 +121,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anExtrusionCutFt.string("CreationMethod").setValue("BySizes") anExtrusionCutFt.real("to_size").setValue(10) anExtrusionCutFt.real("from_size").setValue(10) @@ -129,6 +130,7 @@ anExtrusionCutFt.real("from_offset").setValue(0) #TODO: remove anExtrusionCutFt.selectionList("boolean_objects").append(anExtrusionResult, anExtrusionResult.shape()) anExtrusionCutFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results diff --git a/src/FeaturesPlugin/Test/TestExtrusionFuse.py b/src/FeaturesPlugin/Test/TestExtrusionFuse.py index 29e778c3c..a926bb863 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionFuse.py +++ b/src/FeaturesPlugin/Test/TestExtrusionFuse.py @@ -121,6 +121,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anExtrusionFuseFt.string("CreationMethod").setValue("BySizes") anExtrusionFuseFt.real("to_size").setValue(10) anExtrusionFuseFt.real("from_size").setValue(10) @@ -129,6 +130,7 @@ anExtrusionFuseFt.real("from_offset").setValue(0) #TODO: remove anExtrusionFuseFt.selectionList("boolean_objects").append(anExtrusionResult, anExtrusionResult.shape()) anExtrusionFuseFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results diff --git a/src/FeaturesPlugin/Test/TestExtrusionSketch.py b/src/FeaturesPlugin/Test/TestExtrusionSketch.py index 0b80dcdba..9f5aae8fb 100644 --- a/src/FeaturesPlugin/Test/TestExtrusionSketch.py +++ b/src/FeaturesPlugin/Test/TestExtrusionSketch.py @@ -38,6 +38,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anExtrusionSketchFt.string("CreationMethod").setValue("BySizes") anExtrusionSketchFt.real("to_size").setValue(10) anExtrusionSketchFt.real("from_size").setValue(10) @@ -45,6 +46,7 @@ anExtrusionSketchFt.real("to_offset").setValue(0) #TODO: remove anExtrusionSketchFt.real("from_offset").setValue(0) #TODO: remove anExtrusionSketchFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results @@ -102,6 +104,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anExtrusionSketchFt.string("CreationMethod").setValue("ByPlanesAndOffsets") anExtrusionSketchFt.real("to_size").setValue(0) #TODO: remove anExtrusionSketchFt.real("from_size").setValue(0) #TODO: remove @@ -111,6 +114,7 @@ anExtrusionSketchFt.selection("from_object").setValue(aFromResult, aFromShape) anExtrusionSketchFt.real("from_offset").setValue(0) anExtrusionSketchFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results diff --git a/src/FeaturesPlugin/Test/TestRevolutionCut.py b/src/FeaturesPlugin/Test/TestRevolutionCut.py index 8229b15b4..bbbdd2123 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionCut.py +++ b/src/FeaturesPlugin/Test/TestRevolutionCut.py @@ -149,6 +149,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anRevolutionCutFt.selection("axis_object").setValue(aLineSketchResult, aLineEdge) anRevolutionCutFt.string("CreationMethod").setValue("ByAngles") anRevolutionCutFt.real("to_angle").setValue(50) @@ -158,6 +159,7 @@ anRevolutionCutFt.real("from_offset").setValue(0) #TODO: remove anRevolutionCutFt.selectionList("boolean_objects").append(anExtrusionResult, anExtrusionResult.shape()) anRevolutionCutFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results diff --git a/src/FeaturesPlugin/Test/TestRevolutionFuse.py b/src/FeaturesPlugin/Test/TestRevolutionFuse.py index d15735d2d..3a9e3e728 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionFuse.py +++ b/src/FeaturesPlugin/Test/TestRevolutionFuse.py @@ -149,6 +149,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anRevolutionFuseFt.selection("axis_object").setValue(aLineSketchResult, aLineEdge) anRevolutionFuseFt.string("CreationMethod").setValue("ByAngles") anRevolutionFuseFt.real("to_angle").setValue(50) @@ -158,6 +159,7 @@ anRevolutionFuseFt.real("from_offset").setValue(0) #TODO: remove anRevolutionFuseFt.selectionList("boolean_objects").append(anExtrusionResult, anExtrusionResult.shape()) anRevolutionFuseFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results diff --git a/src/FeaturesPlugin/Test/TestRevolutionSketch.py b/src/FeaturesPlugin/Test/TestRevolutionSketch.py index 589015753..ed54d928a 100644 --- a/src/FeaturesPlugin/Test/TestRevolutionSketch.py +++ b/src/FeaturesPlugin/Test/TestRevolutionSketch.py @@ -62,6 +62,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anRevolutionSketchFt.selection("axis_object").setValue(aLineSketchResult, aLineEdge) anRevolutionSketchFt.string("CreationMethod").setValue("ByAngles") anRevolutionSketchFt.real("to_angle").setValue(50) @@ -70,6 +71,7 @@ anRevolutionSketchFt.real("to_offset").setValue(0) #TODO: remove anRevolutionSketchFt.real("from_offset").setValue(0) #TODO: remove anRevolutionSketchFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results @@ -128,6 +130,7 @@ aCircleRadius = aSketchCircle.real("CircleRadius") anCircleCentr.setValue(0, 0) aCircleRadius.setValue(10) aSession.finishOperation() +aSession.startOperation() anRevolutionSketchFt.selection("axis_object").setValue(aLineSketchResult, aLineEdge) anRevolutionSketchFt.string("CreationMethod").setValue("ByPlanesAndOffsets") anRevolutionSketchFt.real("to_angle").setValue(0) #TODO: remove @@ -138,6 +141,7 @@ anRevolutionSketchFt.selection("from_object").setValue(aFromResult, aFromShape) anRevolutionSketchFt.real("from_offset").setValue(0) anRevolutionSketchFt.execute() aSession.finishOperation() +aSession.finishOperation() #========================================================================= # Test results -- 2.39.2