/[ascend]/trunk/pygtk/test.py
ViewVC logotype

Diff of /trunk/pygtk/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 997 by johnpye, Fri Dec 22 11:03:51 2006 UTC revision 998 by johnpye, Sat Dec 30 06:05:48 2006 UTC
# Line 3  import ascpy Line 3  import ascpy
3  import math  import math
4  import os, subprocess, sys  import os, subprocess, sys
5  import atexit  import atexit
6    import cunit
7    
8  class Ascend(unittest.TestCase):  class Ascend(unittest.TestCase):
9    
# Line 368  class TestIDA(Ascend): Line 369  class TestIDA(Ascend):
369          print M.udot[1][3];          print M.udot[1][3];
370          I.solve()          I.solve()
371          assert 0          assert 0
       
 class CUnit(unittest.TestCase):  
     def setUp(self):  
         self.cunitexe = "../base/generic/test/test"  
       
     def testcunittests(self):  
         res = os.system(self.cunitexe)  
         if res:  
             raise RuntimeError("CUnit tests failed (returned %d -- run %s for details)" % (res,self.cunitexe))  
         else:  
             print "CUnit returned %s" % res  
372    
373  # move code above down here if you want to temporarily avoid testing it  # move code above down here if you want to temporarily avoid testing it
374  class NotToBeTested:  class NotToBeTested:
# Line 386  class NotToBeTested: Line 376  class NotToBeTested:
376          pass          pass
377                    
378  if __name__=='__main__':  if __name__=='__main__':
379        pass
380      atexit.register(ascpy.shutdown)      atexit.register(ascpy.shutdown)
381      unittest.main()      suite = unittest.TestSuite()
382        suite.addTest(unittest.makeSuite(TestCompiler))
383        suite.addTest(unittest.makeSuite(TestSolver))
384        #suite.addTest(TestLSODE)
385        csuites = cunit.load("base/generic/test/libasctestsuite.so")
386        #suite.addTests(csuites)
387        suite.addTests(csuites)
388        unittest.TextTestRunner(verbosity=2).run(suite)
389        #unittest.main()

Legend:
Removed from v.997  
changed lines
  Added in v.998

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22