Salome HOME
Update unit tests for B-spline feature
authorazv <azv@opencascade.com>
Tue, 28 Jan 2020 06:33:31 +0000 (09:33 +0300)
committerazv <azv@opencascade.com>
Tue, 28 Jan 2020 06:33:31 +0000 (09:33 +0300)
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/Test/TestConstraintCoincidenceBSpline.py
src/SketchPlugin/Test/TestConstraintTangentBSpline.py

index 3fde1ddf8684fafe8bf99d97e6c1000c142ff9a6..27965e742648c96ed226431afd726e030ca30892 100644 (file)
@@ -237,6 +237,7 @@ ADD_UNIT_TESTS(
   TestConstraintAngleBehaviorBackward_2.py
   TestConstraintAngleEllipse.py
   TestConstraintCoincidence.py
+  TestConstraintCoincidenceBSpline.py
   TestConstraintCoincidenceEllipse.py
   TestConstraintCoincidenceEllipticArc.py
   TestConstraintCollinear.py
@@ -275,6 +276,7 @@ ADD_UNIT_TESTS(
   TestCreateArcByTransversalLine.py
   TestCreateArcChangeType.py
   TestCreateBSpline.py
+  TestCreateBSplinePeriodic.py
   TestCreateCircleByCenterAndPassed.py
   TestCreateCircleByThreePoints.py
   TestCreateCircleChangeType.py
@@ -311,6 +313,7 @@ ADD_UNIT_TESTS(
   TestPresentation.py
   TestProjection.py
   TestProjectionBSpline.py
+  TestProjectionBSplinePeriodic.py
   TestProjectionEllipse.py
   TestProjectionEllipticArc.py
   TestProjectionIntoResult.py
@@ -318,6 +321,7 @@ ADD_UNIT_TESTS(
   TestRectangle.py
   TestRemainingDoF.py
   TestRemoveBSpline.py
+  TestRemoveBSplinePeriodic.py
   TestRemoveEllipse.py
   TestRemoveEllipticArc.py
   TestRemoveSketch.py
@@ -356,6 +360,7 @@ if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
   ADD_UNIT_TESTS(
     TestMoveArc.py
     TestMoveBSpline.py
+    TestMoveBSplinePeriodic.py
     TestMoveCircle.py
     TestMoveEllipse.py
     TestMoveEllipticArc.py
index 80ab412e2184e68129521397483d36452db70135..36a0426fe7bf43f3b4e5cd530784f31fd874925c 100644 (file)
@@ -99,7 +99,7 @@ class TestCoincidenceBSpline(unittest.TestCase):
 
   def assertPointOnSpline(self, thePoint, theSpline):
     point = GeomAPI_Pnt(thePoint.x(), thePoint.y(), 0.0)
-    bspline = GeomAPI_BSpline(GeomAPI_Curve(theSpline.results()[-1].resultSubShapePair()[0].shape()))
+    bspline = GeomAPI_Curve(theSpline.results()[-1].resultSubShapePair()[0].shape())
     proj = bspline.project(point)
     self.assertAlmostEqual(point.distance(proj), 0.0)
 
index 58a22c38e479a43f0a10c5c4d4b42c7471f92143..e3e758bb670864c0111ad496f7aeca26b831aff5 100644 (file)
@@ -205,7 +205,7 @@ class TestTangentBSpline(unittest.TestCase):
   def test_line_tangent_coincident_by_pole(self):
     """ Test 7. Set tangency between B-spline and a line coincident with B-spline start point
     """
-    aLine = self.mySketch.addLine(10, -10, 90, 40)
+    aLine = self.mySketch.addLine(-15, -25, 50, 40)
     self.myNbLines += 1
     self.myDOF += 4
     model.do()