]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[PythonAPI] reorganised sketcher API tests
authorRenaud NEDELEC <renaud.nedelec@opencascade.com>
Wed, 14 Oct 2015 16:03:25 +0000 (18:03 +0200)
committerRenaud NEDELEC <renaud.nedelec@opencascade.com>
Wed, 14 Oct 2015 16:03:25 +0000 (18:03 +0200)
src/PythonAPI/CMakeLists.txt
src/PythonAPI/Test/TestSketcher.py
src/PythonAPI/Test/TestSketcherAddLine.py [new file with mode: 0644]
src/PythonAPI/Test/TestSketcherSetCoincident.py [new file with mode: 0644]

index ac99093691274977159bc306e398b871d7bcd484..ca494a0b18fbbb28f7d039ed60c1ecc3459b88fd 100644 (file)
@@ -10,5 +10,6 @@ INCLUDE(UnitTest)
 
 ADD_UNIT_TESTS(
   TestModeler.py
-  TestSketcher.py
+  TestSketcherAddLine.py
+  TestSketcherSetCoincident.py
   ) 
index ece5331de30312f9df483e124e88a4e1dad2cc04..f187c28b9f967544dfa5cc5af15aaff41e03b6da 100644 (file)
@@ -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 (file)
index 0000000..959827a
--- /dev/null
@@ -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 (file)
index 0000000..0b4cae6
--- /dev/null
@@ -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