From: azv Date: Thu, 27 Apr 2017 07:27:07 +0000 (+0300) Subject: Adjust TestConstraintHorizontalValidator.py X-Git-Tag: V_2.7.1.1~3^2~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76bd1c37523d59423998531a7f2d8c4e4757b57f;p=modules%2Fshaper.git Adjust TestConstraintHorizontalValidator.py --- diff --git a/src/SketchPlugin/Test/TestConstraintHorizontalValidator.py b/src/SketchPlugin/Test/TestConstraintHorizontalValidator.py index ff225fbc4..caf2f1a49 100644 --- a/src/SketchPlugin/Test/TestConstraintHorizontalValidator.py +++ b/src/SketchPlugin/Test/TestConstraintHorizontalValidator.py @@ -22,17 +22,10 @@ Part_1_doc = Part_1.document() #========================================================================= Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ")) SketchLine_1 = Sketch_1.addLine(20, 20, 40, 80) -SketchLine_1.setName("SketchLine_1") -SketchLine_1.result().setName("SketchLine_1") SketchLine_2 = Sketch_1.addLine(40, 80, 60, 40) -SketchLine_2.setName("SketchLine_2") -SketchLine_2.result().setName("SketchLine_2") SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint()) -SketchConstraintCoincidence_1.setName("SketchConstraintCoincidence_2") SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result()) SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_1.result()) -SketchConstraintHorizontal_1.setName("SketchConstraintHorizontal_1") -SketchConstraintVertical_1.setName("SketchConstraintVertical_1") model.do() #========================================================================= # Checking that sketch and constraints become invalid when to one line @@ -40,7 +33,7 @@ model.do() #========================================================================= aFactory = ModelAPI_Session.get().validators() assert(aFactory.validate(Sketch_1.feature())) -assert(Sketch_1.feature().error() == "Sketch objects are not defined") +assert(Sketch_1.feature().error() != '') #========================================================================= # Remove duplicated Vertical constraints #========================================================================= @@ -54,4 +47,4 @@ model.do() assert(aFactory.validate(Sketch_1.feature())) assert(Sketch_1.feature().error() == '') -#assert(model.checkPythonDump()) +assert(model.checkPythonDump())