self.assertEqual(100,axis.zDimension().value())
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.assertEqual("x + 30", point.z().text())
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.session.finishOperation()
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.assertEqual(self.anCircleCentr.y(), 220.)
self.assertEqual(self.aRadiusAttr.value(), 200.)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
#=========================================================================
# End of test
#=========================================================================
self.assertEqual(self.anCircleCentr.y(), 170.)
self.assertEqual(self.aRadiusAttr.value(), 150.)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
#=========================================================================
# End of test
#=========================================================================
#-----------------------------------------------------------------------------
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
import salome.shaper.examples.MakeBrick1
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
import salome.shaper.examples.MakeBrick2
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
model.addSketch(self.part, plane)
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
import salome.shaper.examples.Platine
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.assertEqual(box.secondPoint().context().shape().isVertex(),True)
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
from salome.shaper import geom
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertEqual(point.coordinates().y(), 2.0)
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
)
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.sketch.setCoincident(l1.endPoint())
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
model.do()
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertEqual(line.startPoint().y(), line.endPoint().y())
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertAlmostEqual(length, 25.0, delta=TestSketcher.DELTA)
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
model.do()
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertAlmostEqual(dot_product, 0.0, delta=TestSketcher.DELTA)
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertEqual(circle.radius().value(), 25.0)
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.sketch.setTangent(None, self.arc)
if __name__ == "__main__":
- unittest.main(verbosity=2, exit=False)
\ No newline at end of file
+ test_program = unittest.main(verbosity=2, exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
self.assertEqual(line.startPoint().x(), line.endPoint().x())
if __name__ == "__main__":
- unittest.main(exit=False)
\ No newline at end of file
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
\ No newline at end of file
# TODO(spo): add tests.
if __name__ == "__main__":
- unittest.main(exit=False)
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
model.do()
self.assertEqual(model.dof(self.mySketch), self.myDOF)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
#=========================================================================
# End of test
#=========================================================================
model.testNbSubShapes(self.mySketch, GeomAPI_Shape.VERTEX, [6])
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.checkPointCoordinates(self.myArc.endPoint(), self.myEnd)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.assertAlmostEqual(self.myCircle.radius().value(), self.myRadius)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.checkPointCoordinates(self.myLine.endPoint(), self.myEnd)
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"
self.assertAlmostEqual(self.myPointCoordinates.y(), coord[1])
-if __name__ == '__main__':
- unittest.main(exit=False)
+if __name__ == "__main__":
+ test_program = unittest.main(exit=False)
+ assert test_program.result.wasSuccessful(), "Test failed"