7 class PointTestCase(unittest.TestCase):
10 self.session = ModelAPI.ModelAPI_Session.get()
11 self.doc = self.session.moduleDocument()
12 self.session.startOperation()
13 self.feature = self.doc.addFeature("Point")
16 self.session.finishOperation()
17 assert(model.checkPythonDump())
18 self.session.closeAll()
20 def test_ConstructorWithValues(self):
21 point = ConstructionAPI.ConstructionAPI_Point(self.feature, 10, "20", "x + 30")
22 #self.assertEqual(10, point.x().value())
23 #self.assertEqual("20", point.y().text())
24 #self.assertEqual("x + 30", point.z().text())
26 def test_setValue(self):
27 point = ConstructionAPI.ConstructionAPI_Point(self.feature)
28 assert(point.x().isInitialized() == False)
29 assert(point.y().isInitialized() == False)
30 assert(point.z().isInitialized() == False)
32 point.setByXYZ(10, "20", "x + 30")
33 self.assertEqual(10, point.x().value())
34 self.assertEqual("20", point.y().text())
35 self.assertEqual("x + 30", point.z().text())
37 if __name__ == "__main__":