From 6d26be2fd235cb0ac4e4776e5beecca4a0e1825a Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 16 Jan 2019 12:15:42 +0300 Subject: [PATCH] Fix the transactions management in the test. --- src/SketchPlugin/Test/TestDegeneratedGeometry.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/SketchPlugin/Test/TestDegeneratedGeometry.py b/src/SketchPlugin/Test/TestDegeneratedGeometry.py index e9b2cfca3..3762b7e73 100644 --- a/src/SketchPlugin/Test/TestDegeneratedGeometry.py +++ b/src/SketchPlugin/Test/TestDegeneratedGeometry.py @@ -128,29 +128,26 @@ model.end() # case 1: undo the error model.begin() aCoincidence = Sketch_3.setCoincident(SketchArc_1.startPoint(), SketchArc_1.endPoint()) -model.do() model.end() model.checkSketchErrorDegenerated(Sketch_3) model.undo() -model.do() +model.begin() model.checkSketch(Sketch_3) # case 2: remove degeneracy-producting constraint -model.begin() +model.do() aCoincidence = Sketch_3.setCoincident(SketchArc_1.startPoint(), SketchArc_1.endPoint()) model.do() model.checkSketchErrorDegenerated(Sketch_3) Part_1_doc.removeFeature(aCoincidence.feature()) model.do() -model.end() model.checkSketch(Sketch_3) # case 3: remove degenerated edge -model.begin() +model.do() aCoincidence = Sketch_3.setCoincident(SketchArc_1.startPoint(), SketchArc_1.endPoint()) model.do() model.checkSketchErrorDegenerated(Sketch_3) ModelAPI.removeFeaturesAndReferences(FeatureSet([SketchArc_1.feature()])) -model.do() model.end() assert(Sketch_3.solverError().value() == "") -- 2.39.2