Commit b6d268a5 by Remi Perenon

Correcting tests scripts

parent 37613b59
Pipeline #3792 failed with stages
in 4 minutes 32 seconds
......@@ -4,6 +4,7 @@
#
import unittest
import sys
import mmtk_basic_tests
import mmtk_energy_tests
......@@ -41,6 +42,9 @@ def suite():
test_suite.addTests(mmtk_universe_tests.suite())
return test_suite
if __name__ == '__main__':
unittest.TextTestRunner(verbosity=2).run(suite())
def run_test():
if not unittest.TextTestRunner(verbosity=2).run(suite()).wasSuccessful():
sys.exit(1)
if __name__ == '__main__':
run_test()
......@@ -41,6 +41,7 @@ class SuperpositionTest(unittest.TestCase):
tr, rms = universe.findTransformation(ref_conf)
self.assert_(abs(rms) < 1.e-5)
universe.applyTransformation(tr)
self.assertTrue(False)
self.assert_(universe.rmsDifference(ref_conf) < 1.e-5)
axis, angle = tr.rotation().axisAndAngle()
self.assert_(abs(angle - 0.7) < 1.e-5)
......
......@@ -47,5 +47,6 @@ def suite():
def run_test():
if not unittest.TextTestRunner(verbosity=2).run(suite()).wasSuccessful():
sys.exit(1)
if __name__ == '__main__':
run_test()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment