X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionAPI%2FTest%2FTestPoint.py;h=fb0357501474f71d80b44cc1e09c4fbefd8c4ef8;hb=a13f87935d2a6f52f942790b6abc874f1016c9fc;hp=478f8b02fcc3a71f5b5facdd7aa7805e324f23ea;hpb=84f912d8ca079ae8f0a43826983e77acdfb68bf5;p=modules%2Fshaper.git diff --git a/src/ConstructionAPI/Test/TestPoint.py b/src/ConstructionAPI/Test/TestPoint.py index 478f8b02f..fb0357501 100644 --- a/src/ConstructionAPI/Test/TestPoint.py +++ b/src/ConstructionAPI/Test/TestPoint.py @@ -1,22 +1,21 @@ -## Copyright (C) 2014-2017 CEA/DEN, EDF R&D -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -## -## See http:##www.salome-platform.org/ or -## email : webmaster.salome@opencascade.com -## +# Copyright (C) 2014-2019 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# import unittest @@ -45,14 +44,14 @@ 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__": - unittest.main() + test_program = unittest.main(exit=False) + assert test_program.result.wasSuccessful(), "Test failed"