self.assertEqual(point.pointData().x(), 1.0)
self.assertEqual(point.pointData().y(), 2.0)
+ def test_empty_args(self):
+ with self.assertRaises(TypeError):
+ self.sketch.addPoint()
+
if __name__ == "__main__":
unittest.main(verbosity=2)
\ No newline at end of file
from TestSketcher import SketcherTestCase
class SketcherSetCoincident(SketcherTestCase):
- def runTest(self):
+ def test_set_coincident(self):
l1 = self.sketch.addLine(0, 0, 0, 1)
l2 = self.sketch.addLine(0, 1, 1, 1)
self.sketch.setCoincident(l1.endPointData(), l2.startPointData())
model.do()
+
+ def test_none_type_arguments(self):
+ l2 = self.sketch.addLine(0, 1, 1, 1)
+ with self.assertRaises(TypeError):
+ self.sketch.setCoincident(None, l2.startPointData())
+
+ def test_empty_arguments(self):
+ l1 = self.sketch.addLine(0, 0, 0, 1)
+ with self.assertRaises(TypeError):
+ self.sketch.setCoincident(l1.endPointData())
if __name__ == "__main__":
- unittest.main()
\ No newline at end of file
+ unittest.main(verbosity=2)
\ No newline at end of file