Salome HOME
Cosmetics. Move XML files to the separate folder inside a corresponding project in VS.
[modules/shaper.git] / src / SketchPlugin / Test / TestConstraintCollinear.py
index 8e4dfdcf8b08eaa143f2d45b02ebf4104c82c53e..05270210b4925d64334a233060f5d58eb56e30d9 100644 (file)
@@ -1,7 +1,26 @@
+# Copyright (C) 2014-2020  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
+#
+
 """
     TestConstraintCollinear.py
     Unit test of SketchPlugin_ConstraintCollinear class
-        
+
     SketchPlugin_ConstraintCollinear
         static const std::string MY_CONSTRAINT_COLLINEAR_ID("SketchConstraintCollinear");
         data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
@@ -165,8 +184,9 @@ class TestConstraintCollinear(unittest.TestCase):
     model.do()
     self.assertEqual(model.dof(self.mySketch), self.myDOF)
 
-if __name__ == '__main__':
-  unittest.main()
+if __name__ == "__main__":
+    test_program = unittest.main(exit=False)
+    assert test_program.result.wasSuccessful(), "Test failed"
 #=========================================================================
 # End of test
 #=========================================================================