From: Renaud NEDELEC Date: Wed, 14 Oct 2015 16:03:25 +0000 (+0200) Subject: [PythonAPI] reorganised sketcher API tests X-Git-Tag: V_2.1.0~206^2~96 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=939a2b895b2a5f4213d69b14b1498efbd3d572e6;p=modules%2Fshaper.git [PythonAPI] reorganised sketcher API tests --- diff --git a/src/PythonAPI/CMakeLists.txt b/src/PythonAPI/CMakeLists.txt index ac9909369..ca494a0b1 100644 --- a/src/PythonAPI/CMakeLists.txt +++ b/src/PythonAPI/CMakeLists.txt @@ -10,5 +10,6 @@ INCLUDE(UnitTest) ADD_UNIT_TESTS( TestModeler.py - TestSketcher.py + TestSketcherAddLine.py + TestSketcherSetCoincident.py ) diff --git a/src/PythonAPI/Test/TestSketcher.py b/src/PythonAPI/Test/TestSketcher.py index ece5331de..f187c28b9 100644 --- a/src/PythonAPI/Test/TestSketcher.py +++ b/src/PythonAPI/Test/TestSketcher.py @@ -11,16 +11,3 @@ class SketcherTestCase(unittest.TestCase): def tearDown(self): modeler.end() - - def test_add_line(self): - print "add_line" - self.sketch.addLine(0, 0, 0, 1) - - def test_set_coincident(self): - print "set_coincident" - l1 = self.sketch.addLine(0, 0, 0, 1) - l2 = self.sketch.addLine(0, 1, 1, 1) - self.sketch.setCoincident(l1.endPointData(), l2.startPointData()) - -if __name__ == "__main__": - unittest.main() diff --git a/src/PythonAPI/Test/TestSketcherAddLine.py b/src/PythonAPI/Test/TestSketcherAddLine.py new file mode 100644 index 000000000..959827a6a --- /dev/null +++ b/src/PythonAPI/Test/TestSketcherAddLine.py @@ -0,0 +1,10 @@ +import unittest +import modeler +from TestSketcher import SketcherTestCase + +class SketcherAddLineTestCase(SketcherTestCase): + def runTest(self): + self.sketch.addLine(0, 0, 0, 1) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file diff --git a/src/PythonAPI/Test/TestSketcherSetCoincident.py b/src/PythonAPI/Test/TestSketcherSetCoincident.py new file mode 100644 index 000000000..0b4cae6c3 --- /dev/null +++ b/src/PythonAPI/Test/TestSketcherSetCoincident.py @@ -0,0 +1,12 @@ +import unittest +import modeler +from TestSketcher import SketcherTestCase + +class SketcherSetCoincident(SketcherTestCase): + def runTest(self): + l1 = self.sketch.addLine(0, 0, 0, 1) + l2 = self.sketch.addLine(0, 1, 1, 1) + self.sketch.setCoincident(l1.endPointData(), l2.startPointData()) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file