From: mpv Date: Wed, 16 Jan 2019 09:15:42 +0000 (+0300) Subject: Fix the transactions management in the test. X-Git-Tag: Jan2019~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6d26be2fd235cb0ac4e4776e5beecca4a0e1825a;p=modules%2Fshaper.git Fix the transactions management in the test. --- 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() == "")