]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix tests according to new API.
authormzn <mzn@opencascade.com>
Mon, 1 Oct 2018 07:18:06 +0000 (10:18 +0300)
committermzn <mzn@opencascade.com>
Mon, 1 Oct 2018 07:18:52 +0000 (10:18 +0300)
src/ConstructionAPI/Test/TestPoint.py
src/ModelHighAPI/Test/TestRefAttr.py

index 572e78ab81d8bdd88e2ec4f09649aa880423db7a..30d9b00bbddb680915db96bb280899236887f7fa 100644 (file)
@@ -45,14 +45,13 @@ class PointTestCase(unittest.TestCase):
 
     def test_setValue(self):
         point = ConstructionAPI.ConstructionAPI_Point(self.feature)
-        assert(point.x().isInitialized() == False)
-        assert(point.y().isInitialized() == False)
-        assert(point.z().isInitialized() == False)
+        assert(point.point().isInitialized() == False)
 
         point.setByXYZ(10, "20", "x + 30")
-        self.assertEqual(10, point.x().value())
-        self.assertEqual("20", point.y().text())
-        self.assertEqual("x + 30", point.z().text())
+        print(dir(point.point()))
+        self.assertEqual(10, point.point().x())
+        self.assertEqual("20", point.point().textY())
+        self.assertEqual("x + 30", point.point().textZ())
 
 if __name__ == "__main__":
     test_program = unittest.main(exit=False)
index 56ed4716f660591d0df1f08ac99fdf9502470a74..f2e518628e1665cad75df61d74f36e46946b2c66 100644 (file)
@@ -45,8 +45,8 @@ class RefAttrTestCase(FeaturesFixture):
         ModelHighAPI.ModelHighAPI_RefAttr()
 
     def test_create_from_attribute(self):
-        print(self.feature.x())
-        ModelHighAPI.ModelHighAPI_RefAttr(self.feature.x())
+        print(self.feature.point())
+        ModelHighAPI.ModelHighAPI_RefAttr(self.feature.point())
 
     def test_create_from_object(self):
         ModelHighAPI.ModelHighAPI_RefAttr(self.feature.feature())