From 6214a3fb0a7e0a93669e98718b2ea9a23a7128ed Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 18 Dec 2018 13:47:59 +0300 Subject: [PATCH] [Code coverage GeomValidators]: Improve coverage of ZeroOffset validator --- .../Test/TestExtrusion_ErrorMsg.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/FeaturesPlugin/Test/TestExtrusion_ErrorMsg.py b/src/FeaturesPlugin/Test/TestExtrusion_ErrorMsg.py index 00819d0ef..b800308bb 100644 --- a/src/FeaturesPlugin/Test/TestExtrusion_ErrorMsg.py +++ b/src/FeaturesPlugin/Test/TestExtrusion_ErrorMsg.py @@ -50,4 +50,24 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketc assert(Extrusion_1.feature().error() != "") Part_1_doc.removeFeature(Extrusion_1.feature()) +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("EDGE", "Sketch_2/SketchArc_1_2"), 0, model.selection("EDGE", "Sketch_2/SketchArc_1_2"), 10) +assert(Extrusion_1.feature().error() != "") +Part_1_doc.removeFeature(Extrusion_1.feature()) + +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("EDGE", "Sketch_2/SketchArc_1_2"), 0, model.selection("FACE", "PartSet/XOY"), 10) +assert(Extrusion_1.feature().error() != "") +Part_1_doc.removeFeature(Extrusion_1.feature()) + +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection("EDGE", "Sketch_2/SketchArc_1_2"), 0, model.selection(), 10) +assert(Extrusion_1.feature().error() != "") +Part_1_doc.removeFeature(Extrusion_1.feature()) + +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection(), 0, model.selection("EDGE", "Sketch_2/SketchArc_1_2"), 10) +assert(Extrusion_1.feature().error() != "") +Part_1_doc.removeFeature(Extrusion_1.feature()) + +Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_1")], model.selection(), model.selection(), 0, model.selection("FACE", "PartSet/XOY"), 10) +assert(Extrusion_1.feature().error() == "") +#Part_1_doc.removeFeature(Extrusion_1.feature()) + model.end() -- 2.39.2