From: mpv Date: Tue, 27 Feb 2018 10:57:58 +0000 (+0300) Subject: Issue #2431 - remove application exit from unit tests X-Git-Tag: V_3.0.0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4e0d47fcb8320ae3a7e5169fa121d3b2e37db7ac;p=modules%2Fshaper.git Issue #2431 - remove application exit from unit tests --- diff --git a/src/ConstructionAPI/Test/TestAxis.py b/src/ConstructionAPI/Test/TestAxis.py index b6af53ae3..995577136 100644 --- a/src/ConstructionAPI/Test/TestAxis.py +++ b/src/ConstructionAPI/Test/TestAxis.py @@ -45,4 +45,4 @@ class AxisTestCase(unittest.TestCase): self.assertEqual(100,axis.zDimension().value()) if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ConstructionAPI/Test/TestPoint.py b/src/ConstructionAPI/Test/TestPoint.py index 478f8b02f..185859540 100644 --- a/src/ConstructionAPI/Test/TestPoint.py +++ b/src/ConstructionAPI/Test/TestPoint.py @@ -55,4 +55,4 @@ class PointTestCase(unittest.TestCase): self.assertEqual("x + 30", point.z().text()) if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ExchangeAPI/Test/TestExchange.py b/src/ExchangeAPI/Test/TestExchange.py index 7a5670f99..94c731faf 100644 --- a/src/ExchangeAPI/Test/TestExchange.py +++ b/src/ExchangeAPI/Test/TestExchange.py @@ -47,4 +47,4 @@ class ExchangeTestCase(unittest.TestCase): self.session.finishOperation() if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ModelHighAPI/Test/TestDouble.py b/src/ModelHighAPI/Test/TestDouble.py index 116e20304..438444b02 100644 --- a/src/ModelHighAPI/Test/TestDouble.py +++ b/src/ModelHighAPI/Test/TestDouble.py @@ -35,4 +35,4 @@ class DoubleTestCase(unittest.TestCase): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ModelHighAPI/Test/TestInteger.py b/src/ModelHighAPI/Test/TestInteger.py index 27e1b4d23..26ac7cf62 100644 --- a/src/ModelHighAPI/Test/TestInteger.py +++ b/src/ModelHighAPI/Test/TestInteger.py @@ -35,4 +35,4 @@ class IntegerTestCase(unittest.TestCase): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ModelHighAPI/Test/TestRefAttr.py b/src/ModelHighAPI/Test/TestRefAttr.py index a6cffbd91..7706e4a16 100644 --- a/src/ModelHighAPI/Test/TestRefAttr.py +++ b/src/ModelHighAPI/Test/TestRefAttr.py @@ -56,4 +56,4 @@ class RefAttrTestCase(FeaturesFixture): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ModelHighAPI/Test/TestReference.py b/src/ModelHighAPI/Test/TestReference.py index 2e82750e2..434583303 100644 --- a/src/ModelHighAPI/Test/TestReference.py +++ b/src/ModelHighAPI/Test/TestReference.py @@ -52,4 +52,4 @@ class RefAttrTestCase(FeaturesFixture): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/ParametersPlugin/Test/TestParameterChangeValue.py b/src/ParametersPlugin/Test/TestParameterChangeValue.py index b6ff5eefe..2da87e4e6 100644 --- a/src/ParametersPlugin/Test/TestParameterChangeValue.py +++ b/src/ParametersPlugin/Test/TestParameterChangeValue.py @@ -176,7 +176,7 @@ class TestParameterRename(unittest.TestCase): self.assertEqual(self.aRadiusAttr.value(), 200.) if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) #========================================================================= # End of test #========================================================================= diff --git a/src/PythonAPI/Test/TestFeatures.py b/src/PythonAPI/Test/TestFeatures.py index 067ae4e7b..7358f11ef 100644 --- a/src/PythonAPI/Test/TestFeatures.py +++ b/src/PythonAPI/Test/TestFeatures.py @@ -107,4 +107,4 @@ class FeaturesTestCase(FeaturesFixture): #----------------------------------------------------------------------------- if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestFeaturesExtrusion.py b/src/PythonAPI/Test/TestFeaturesExtrusion.py index c8795cbdf..e5f08c70f 100644 --- a/src/PythonAPI/Test/TestFeaturesExtrusion.py +++ b/src/PythonAPI/Test/TestFeaturesExtrusion.py @@ -173,4 +173,4 @@ class FeaturesExtrusionTestCase(FeaturesExtrusionFixture): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestFeaturesRevolution.py b/src/PythonAPI/Test/TestFeaturesRevolution.py index f1d4f9c5d..37a69b386 100644 --- a/src/PythonAPI/Test/TestFeaturesRevolution.py +++ b/src/PythonAPI/Test/TestFeaturesRevolution.py @@ -206,4 +206,4 @@ class FeaturesRevolutionTestCase(FeaturesRevolutionFixture): if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestMakeBrick1.py b/src/PythonAPI/Test/TestMakeBrick1.py index d70e9abf2..b5bd7bfef 100644 --- a/src/PythonAPI/Test/TestMakeBrick1.py +++ b/src/PythonAPI/Test/TestMakeBrick1.py @@ -23,4 +23,4 @@ import unittest import salome.shaper.examples.MakeBrick1 if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestMakeBrick2.py b/src/PythonAPI/Test/TestMakeBrick2.py index 55f848758..cc681ff09 100644 --- a/src/PythonAPI/Test/TestMakeBrick2.py +++ b/src/PythonAPI/Test/TestMakeBrick2.py @@ -23,4 +23,4 @@ import unittest import salome.shaper.examples.MakeBrick2 if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestModel.py b/src/PythonAPI/Test/TestModel.py index 0d7e0eb27..5317eeb87 100644 --- a/src/PythonAPI/Test/TestModel.py +++ b/src/PythonAPI/Test/TestModel.py @@ -36,4 +36,4 @@ class ModelTestCase(unittest.TestCase): model.addSketch(self.part, plane) if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestPlatine.py b/src/PythonAPI/Test/TestPlatine.py index dafee790c..dd5b49890 100644 --- a/src/PythonAPI/Test/TestPlatine.py +++ b/src/PythonAPI/Test/TestPlatine.py @@ -23,4 +23,4 @@ import unittest import salome.shaper.examples.Platine if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestPrimitivesBox.py b/src/PythonAPI/Test/TestPrimitivesBox.py index 80a9d33dd..c67940670 100644 --- a/src/PythonAPI/Test/TestPrimitivesBox.py +++ b/src/PythonAPI/Test/TestPrimitivesBox.py @@ -60,4 +60,4 @@ class PrimitivesAddBoxTestCase(PrimitivesAddBox): self.assertEqual(box.secondPoint().context().shape().isVertex(),True) if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestPythonAPI.py b/src/PythonAPI/Test/TestPythonAPI.py index 2f804b031..fadc37be7 100644 --- a/src/PythonAPI/Test/TestPythonAPI.py +++ b/src/PythonAPI/Test/TestPythonAPI.py @@ -23,4 +23,4 @@ from salome.shaper import model from salome.shaper import geom if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/PythonAPI/Test/TestSketcherAddArc.py b/src/PythonAPI/Test/TestSketcherAddArc.py index 4996f678e..1c3d2278f 100644 --- a/src/PythonAPI/Test/TestSketcherAddArc.py +++ b/src/PythonAPI/Test/TestSketcherAddArc.py @@ -55,4 +55,4 @@ class SketcherAddArc(SketcherTestCase): if __name__ == "__main__": - unittest.main(verbosity=2) + unittest.main(verbosity=2, exit=False) diff --git a/src/PythonAPI/Test/TestSketcherAddCircle.py b/src/PythonAPI/Test/TestSketcherAddCircle.py index e8e76087b..13ac04202 100644 --- a/src/PythonAPI/Test/TestSketcherAddCircle.py +++ b/src/PythonAPI/Test/TestSketcherAddCircle.py @@ -42,4 +42,4 @@ class SketcherAddCircle(SketcherTestCase): if __name__ == "__main__": - unittest.main(verbosity=2) + unittest.main(verbosity=2, exit=False) diff --git a/src/PythonAPI/Test/TestSketcherAddLine.py b/src/PythonAPI/Test/TestSketcherAddLine.py index f295a8b29..e5b021bf7 100644 --- a/src/PythonAPI/Test/TestSketcherAddLine.py +++ b/src/PythonAPI/Test/TestSketcherAddLine.py @@ -41,4 +41,4 @@ class SketcherAddLine(SketcherTestCase): if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherAddMirror.py b/src/PythonAPI/Test/TestSketcherAddMirror.py index 4c6633e32..bfafe8b81 100644 --- a/src/PythonAPI/Test/TestSketcherAddMirror.py +++ b/src/PythonAPI/Test/TestSketcherAddMirror.py @@ -47,4 +47,4 @@ class SketcherAddLine(SketcherTestCase): # self.assertTrue(False, msg="%s" % (dir(mirrored_circle))) if __name__ == "__main__": - unittest.main(verbosity=2) + unittest.main(verbosity=2, exit=False) diff --git a/src/PythonAPI/Test/TestSketcherAddPoint.py b/src/PythonAPI/Test/TestSketcherAddPoint.py index 2ec59d0fa..ce6a59a20 100644 --- a/src/PythonAPI/Test/TestSketcherAddPoint.py +++ b/src/PythonAPI/Test/TestSketcherAddPoint.py @@ -37,4 +37,4 @@ class SketcherAddPoint(SketcherTestCase): self.assertEqual(point.coordinates().y(), 2.0) if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetAngle.py b/src/PythonAPI/Test/TestSketcherSetAngle.py index 583fd51b2..80341e369 100644 --- a/src/PythonAPI/Test/TestSketcherSetAngle.py +++ b/src/PythonAPI/Test/TestSketcherSetAngle.py @@ -51,4 +51,4 @@ class SketcherSetAngle(SketcherTestCase): ) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetCoincident.py b/src/PythonAPI/Test/TestSketcherSetCoincident.py index 1ebe0ce5b..4ceda3894 100644 --- a/src/PythonAPI/Test/TestSketcherSetCoincident.py +++ b/src/PythonAPI/Test/TestSketcherSetCoincident.py @@ -40,4 +40,4 @@ class SketcherSetCoincident(SketcherTestCase): self.sketch.setCoincident(l1.endPoint()) if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetFillet.py b/src/PythonAPI/Test/TestSketcherSetFillet.py index d05f76530..52f9e6336 100644 --- a/src/PythonAPI/Test/TestSketcherSetFillet.py +++ b/src/PythonAPI/Test/TestSketcherSetFillet.py @@ -38,4 +38,4 @@ class SketcherSetFillet(SketcherTestCase): model.do() if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetFixed.py b/src/PythonAPI/Test/TestSketcherSetFixed.py index d0a0b57a4..54a485452 100644 --- a/src/PythonAPI/Test/TestSketcherSetFixed.py +++ b/src/PythonAPI/Test/TestSketcherSetFixed.py @@ -32,4 +32,4 @@ class SketcherSetFixed(SketcherTestCase): self.assertEqual((circle.center().x(), circle.center().y()), (0, 10)) if __name__ == "__main__": - unittest.main(verbosity=2) + unittest.main(verbosity=2, exit=False) diff --git a/src/PythonAPI/Test/TestSketcherSetHorizontal.py b/src/PythonAPI/Test/TestSketcherSetHorizontal.py index 416fccfc1..e5c40aef5 100644 --- a/src/PythonAPI/Test/TestSketcherSetHorizontal.py +++ b/src/PythonAPI/Test/TestSketcherSetHorizontal.py @@ -30,4 +30,4 @@ class SketcherSetHorizontal(SketcherTestCase): self.assertEqual(line.startPoint().y(), line.endPoint().y()) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetLength.py b/src/PythonAPI/Test/TestSketcherSetLength.py index bba6c2f16..233f677b5 100644 --- a/src/PythonAPI/Test/TestSketcherSetLength.py +++ b/src/PythonAPI/Test/TestSketcherSetLength.py @@ -39,4 +39,4 @@ class SketcherSetLength(SketcherTestCase): self.assertAlmostEqual(length, 25.0, delta=TestSketcher.DELTA) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetParallel.py b/src/PythonAPI/Test/TestSketcherSetParallel.py index e077f26d4..99b78e150 100644 --- a/src/PythonAPI/Test/TestSketcherSetParallel.py +++ b/src/PythonAPI/Test/TestSketcherSetParallel.py @@ -30,4 +30,4 @@ class SketcherSetParallel(SketcherTestCase): model.do() if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetPerpendicular.py b/src/PythonAPI/Test/TestSketcherSetPerpendicular.py index 99fa66124..b702cb563 100644 --- a/src/PythonAPI/Test/TestSketcherSetPerpendicular.py +++ b/src/PythonAPI/Test/TestSketcherSetPerpendicular.py @@ -38,4 +38,4 @@ class SketcherSetPerpendicular(SketcherTestCase): self.assertAlmostEqual(dot_product, 0.0, delta=TestSketcher.DELTA) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetRadius.py b/src/PythonAPI/Test/TestSketcherSetRadius.py index aa06f7cef..37f9540fc 100644 --- a/src/PythonAPI/Test/TestSketcherSetRadius.py +++ b/src/PythonAPI/Test/TestSketcherSetRadius.py @@ -38,4 +38,4 @@ class SketcherSetRadius(SketcherTestCase): self.assertEqual(circle.radius().value(), 25.0) if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetTangent.py b/src/PythonAPI/Test/TestSketcherSetTangent.py index b0b953ec7..127b070ec 100644 --- a/src/PythonAPI/Test/TestSketcherSetTangent.py +++ b/src/PythonAPI/Test/TestSketcherSetTangent.py @@ -41,4 +41,4 @@ class SketcherSetTangent(SketcherTestCase): self.sketch.setTangent(None, self.arc) if __name__ == "__main__": - unittest.main(verbosity=2) \ No newline at end of file + unittest.main(verbosity=2, exit=False) \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetVertical.py b/src/PythonAPI/Test/TestSketcherSetVertical.py index a191a45f6..76926b3dc 100644 --- a/src/PythonAPI/Test/TestSketcherSetVertical.py +++ b/src/PythonAPI/Test/TestSketcherSetVertical.py @@ -30,4 +30,4 @@ class SketcherSetVertical(SketcherTestCase): self.assertEqual(line.startPoint().x(), line.endPoint().x()) if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main(exit=False) \ No newline at end of file diff --git a/src/SketchAPI/Test/TestSketch.py b/src/SketchAPI/Test/TestSketch.py index 1757b40a5..c5cbfa865 100644 --- a/src/SketchAPI/Test/TestSketch.py +++ b/src/SketchAPI/Test/TestSketch.py @@ -35,4 +35,4 @@ class SketchTestCase(unittest.TestCase): # TODO(spo): add tests. if __name__ == "__main__": - unittest.main() + unittest.main(exit=False) diff --git a/src/SketchPlugin/Test/TestConstraintCollinear.py b/src/SketchPlugin/Test/TestConstraintCollinear.py index 1e9dcfbe0..6f3d2dac5 100644 --- a/src/SketchPlugin/Test/TestConstraintCollinear.py +++ b/src/SketchPlugin/Test/TestConstraintCollinear.py @@ -186,7 +186,7 @@ class TestConstraintCollinear(unittest.TestCase): self.assertEqual(model.dof(self.mySketch), self.myDOF) if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) #========================================================================= # End of test #========================================================================= diff --git a/src/SketchPlugin/Test/TestFilletInteracting.py b/src/SketchPlugin/Test/TestFilletInteracting.py index 5026f5385..9eac72b0e 100644 --- a/src/SketchPlugin/Test/TestFilletInteracting.py +++ b/src/SketchPlugin/Test/TestFilletInteracting.py @@ -633,4 +633,4 @@ class TestFilletInteracting(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) diff --git a/src/SketchPlugin/Test/TestMoveArc.py b/src/SketchPlugin/Test/TestMoveArc.py index 4419d85e1..53c49dcab 100644 --- a/src/SketchPlugin/Test/TestMoveArc.py +++ b/src/SketchPlugin/Test/TestMoveArc.py @@ -346,4 +346,4 @@ class TestMoveArc(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) diff --git a/src/SketchPlugin/Test/TestMoveCircle.py b/src/SketchPlugin/Test/TestMoveCircle.py index 54a9b580e..c0ded8ac0 100644 --- a/src/SketchPlugin/Test/TestMoveCircle.py +++ b/src/SketchPlugin/Test/TestMoveCircle.py @@ -146,4 +146,4 @@ class TestMoveCircle(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) diff --git a/src/SketchPlugin/Test/TestMoveLine.py b/src/SketchPlugin/Test/TestMoveLine.py index 3d4efa1dc..fe63ee0f6 100644 --- a/src/SketchPlugin/Test/TestMoveLine.py +++ b/src/SketchPlugin/Test/TestMoveLine.py @@ -133,4 +133,4 @@ class TestMoveLine(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(exit=False) diff --git a/src/SketchPlugin/Test/TestMovePoint.py b/src/SketchPlugin/Test/TestMovePoint.py index 60b0a43b6..2638be12b 100644 --- a/src/SketchPlugin/Test/TestMovePoint.py +++ b/src/SketchPlugin/Test/TestMovePoint.py @@ -105,4 +105,4 @@ class TestMovePoint(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest.main(exit=False)