From: azv Date: Wed, 13 Mar 2019 08:13:42 +0000 (+0300) Subject: Improve code coverage for GeomValidators package X-Git-Tag: V9_3_0b1~3^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30eeef8a90e071ade3830edf4ac82d3070b18fe6;p=modules%2Fshaper.git Improve code coverage for GeomValidators package --- diff --git a/src/FeaturesPlugin/Test/TestBooleanCut_ErrorMsg.py b/src/FeaturesPlugin/Test/TestBooleanCut_ErrorMsg.py index 65a5a9e69..be07111e6 100644 --- a/src/FeaturesPlugin/Test/TestBooleanCut_ErrorMsg.py +++ b/src/FeaturesPlugin/Test/TestBooleanCut_ErrorMsg.py @@ -33,3 +33,18 @@ Cut_1 = aPart.addFeature("Cut") Cut_1.execute() assert(Cut_1.error() != "") aSession.finishOperation() + + +from salome.shaper import model + +model.begin() +partSet = model.moduleDocument() +Part_1 = model.addPart(partSet) +Part_1_doc = Part_1.document() +Sketch_2 = model.addSketch(Part_1_doc, model.defaultPlane("XOY")) +SketchLine_1 = Sketch_2.addLine(-30, -30, 0, 10) +model.do() +Cut_1 = model.addCut(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], [model.selection("SOLID", "")]) +model.do() +assert(Cut_1.feature().error() != "") +model.end()