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

Annotation of /trunk/test.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 933 - (hide annotations) (download) (as text)
Thu Nov 23 22:28:00 2006 UTC (13 years ago) by johnpye
Original Path: trunk/pygtk/test.py
File MIME type: text/x-python
File size: 847 byte(s)
Fixed some bugs with error_reporter_tree, and with error_callback in gtkbrowser.py
1 johnpye 669 import unittest
2    
3     class AscendTest(unittest.TestCase):
4    
5 johnpye 933 def setUp(self):
6     import ascpy
7     self.L = ascpy.Library()
8    
9     def tearDown(self):
10     self.L.clear()
11     del self.L
12    
13 johnpye 932 def testIDA(self):
14     try:
15 johnpye 933 self.L.load('johnpye/shm.a4c')
16     M = self.L.findType('shm').getSimulation('sim')
17 johnpye 932 M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())
18     except Exception,e:
19     self.fail(str(e))
20    
21 johnpye 669 def testloading(self):
22 johnpye 933 pass
23 johnpye 669
24 johnpye 689 def testsystema4l(self):
25 johnpye 933 self.L.load('simpleflowsheet01.a4c')
26 johnpye 930
27 johnpye 932 def testatomsa4l(self):
28 johnpye 933 self.L.load('atoms.a4l')
29 johnpye 932
30     def testlog10(self):
31 johnpye 933 self.L.load('johnpye/testlog10.a4c')
32     T = self.L.findType('testlog10')
33 johnpye 932 M = T.getSimulation('sim')
34     M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())
35     M.run(T.getMethod('self_test'))
36    
37     class NotToBeTested:
38     def nothing(self):
39     pass
40    
41 johnpye 689
42 johnpye 669 if __name__=='__main__':
43     unittest.main()

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