From: mpv Date: Tue, 23 Jan 2018 11:08:01 +0000 (+0300) Subject: Fix for the unit tests due to names changing in issue #2375 X-Git-Tag: V_3.0.0RC1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0748a19e5641e488fb258ac14620d7bd66331ce0;p=modules%2Fshaper.git Fix for the unit tests due to names changing in issue #2375 --- diff --git a/src/FeaturesPlugin/Test/Test2172.py b/src/FeaturesPlugin/Test/Test2172.py index 65c4daca7..993dceb2e 100644 --- a/src/FeaturesPlugin/Test/Test2172.py +++ b/src/FeaturesPlugin/Test/Test2172.py @@ -74,7 +74,7 @@ SketchConstraintDistance_4 = Sketch_1.setDistance(SketchCircle_1.center(), Sketc model.do() Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchLine_8f")], model.selection("EDGE", "PartSet/OZ"), 360, 0) Revolution_2 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_2_2f-SketchLine_7r")], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_2_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_2"), model.selection("EDGE", "Revolution_2_1/Base_Edge_3"), model.selection("EDGE", "Revolution_2_1/Base_Edge_1")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2"), model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_6"), model.selection("EDGE", "Revolution_1_1/Base_Edge_8"), model.selection("EDGE", "Revolution_2_1/Base_Edge_8"), model.selection("EDGE", "Revolution_2_1/Lateral_2"), model.selection("EDGE", "Revolution_2_1/Lateral_4"), model.selection("EDGE", "Revolution_2_1/Base_Edge_10"), model.selection("EDGE", "Revolution_2_1/Base_Edge_12"), model.selection("EDGE", "Revolution_2_1/Lateral_6")]) model.end() # check that resulting group selection is valid diff --git a/src/FeaturesPlugin/Test/Test2197_1.py b/src/FeaturesPlugin/Test/Test2197_1.py index e157deb79..4375edb71 100644 --- a/src/FeaturesPlugin/Test/Test2197_1.py +++ b/src/FeaturesPlugin/Test/Test2197_1.py @@ -29,8 +29,8 @@ SketchCircle_1 = Sketch_1.addCircle(-150, 79, -50, 79) SketchCircle_2 = Sketch_1.addCircle(-155, 278, -10, 278) model.do() Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2f-SketchCircle_2_2f")], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")]) -Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_8"), model.selection("EDGE", "Revolution_1_1/Base_Edge_10"), model.selection("EDGE", "Revolution_1_1/Base_Edge_12")]) +Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2"), model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Lateral_6")]) model.end() # check that resulting group selection is valid diff --git a/src/FeaturesPlugin/Test/Test2197_2.py b/src/FeaturesPlugin/Test/Test2197_2.py index c32cd440b..cedd7f88f 100644 --- a/src/FeaturesPlugin/Test/Test2197_2.py +++ b/src/FeaturesPlugin/Test/Test2197_2.py @@ -29,9 +29,9 @@ SketchCircle_1 = Sketch_1.addCircle(-150, 80, 100) model.do() Face_1 = model.addFace(Part_1_doc, [model.selection("EDGE", "Sketch_1/Edge-SketchCircle_1_2")]) Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Face_1_1")], model.selection("EDGE", "PartSet/OZ"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_1")]) -Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_1")]) -Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Lateral_Edge_1&Revolution_1_1/Base_Edge_1")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Base_Edge_4")]) +Group_2 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_2")]) +Group_3 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Lateral_2&Revolution_1_1/Base_Edge_4")]) model.end() # check that resulting group selection is valid diff --git a/src/FeaturesPlugin/Test/Test2197_3.py b/src/FeaturesPlugin/Test/Test2197_3.py index 6ce089431..dc6122bb3 100644 --- a/src/FeaturesPlugin/Test/Test2197_3.py +++ b/src/FeaturesPlugin/Test/Test2197_3.py @@ -36,7 +36,7 @@ SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_4.endPoint()) model.do() Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_Edge_3"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Lateral_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Base_Edge_3")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Lateral_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_10"), model.selection("EDGE", "Revolution_1_1/Lateral_6"), model.selection("EDGE", "Revolution_1_1/Base_Edge_12"), model.selection("EDGE", "Revolution_1_1/Base_Edge_14")]) model.end() # check that resulting group selection is valid diff --git a/src/FeaturesPlugin/Test/Test2197_4.py b/src/FeaturesPlugin/Test/Test2197_4.py index d68bbf00c..8478aebcf 100644 --- a/src/FeaturesPlugin/Test/Test2197_4.py +++ b/src/FeaturesPlugin/Test/Test2197_4.py @@ -52,7 +52,7 @@ SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_7") model.do() Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1f-SketchLine_3f-SketchLine_4f-SketchLine_5r-SketchLine_6r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_4"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_1"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("EDGE", "Revolution_1_1/Generated_Face_5&Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4&Revolution_1_1/Generated_Face_3"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3&Revolution_1_1/Generated_Face_2"), model.selection("EDGE", "Revolution_1_1/Base_Edge_4"), model.selection("EDGE", "Revolution_1_1/Base_Edge_2"), model.selection("EDGE", "Revolution_1_1/Generated_Face_4"), model.selection("EDGE", "Revolution_1_1/Generated_Face_3")]) model.end() # check that resulting group selection is valid diff --git a/src/FeaturesPlugin/Test/Test2233.py b/src/FeaturesPlugin/Test/Test2233.py index 5c6d5f209..c4015977d 100644 --- a/src/FeaturesPlugin/Test/Test2233.py +++ b/src/FeaturesPlugin/Test/Test2233.py @@ -38,7 +38,7 @@ SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_1.endPoint()) model.do() Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchArc_1_2f-SketchLine_2f")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_2"), 360, 0) -Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Vertex_1"), model.selection("VERTEX", "Revolution_1_1/Vertex_2")]) +Group_1 = model.addGroup(Part_1_doc, [model.selection("VERTEX", "Revolution_1_1/Vertex_6"), model.selection("VERTEX", "Revolution_1_1/Vertex_8")]) model.end() # check that resulting group selection is valid and names are different diff --git a/src/ModelAPI/Test/TestCustomName_Placement.py b/src/ModelAPI/Test/TestCustomName_Placement.py index b8cd116e4..ad2043f7f 100644 --- a/src/ModelAPI/Test/TestCustomName_Placement.py +++ b/src/ModelAPI/Test/TestCustomName_Placement.py @@ -46,7 +46,7 @@ Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/ Extrusion_1.result().setName("prism") Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_5r-SketchLine_6r-SketchLine_7r")], model.selection("EDGE", "Sketch_1/Edge-SketchLine_6"), 360, 0) Revolution_1.result().setName("spinner") -Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_Edge_1&spinner/Base_Edge_1"), model.selection("FACE", "prism/Generated_Face_2"), False, True) +Placement_1 = model.addPlacement(Part_1_doc, [model.selection("SOLID", "spinner")], model.selection("VERTEX", "spinner/Lateral_6&spinner/Base_Edge_10"), model.selection("FACE", "prism/Generated_Face_2"), False, True) model.do() assert(Placement_1.result().name() == Revolution_1.result().name()), "Placement name '{}' != '{}'".format(Placement_1.result().name(), Revolution_1.result().name())