]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix the transactions management in the test.
authormpv <mpv@opencascade.com>
Wed, 16 Jan 2019 09:15:42 +0000 (12:15 +0300)
committermpv <mpv@opencascade.com>
Wed, 16 Jan 2019 09:15:42 +0000 (12:15 +0300)
src/SketchPlugin/Test/TestDegeneratedGeometry.py

index e9b2cfca37ec80ba24c42e157512429905bc4fae..3762b7e73286609cab21753fb5fb425722a35037 100644 (file)
@@ -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() == "")