ADD_UNIT_TESTS(
TestModeler.py
- TestSketcher.py
+ TestSketcherAddLine.py
+ TestSketcherSetCoincident.py
)
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()
--- /dev/null
+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
--- /dev/null
+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