/[escript]/trunk/pyvisi/test/python/test_plot.py
ViewVC logotype

Annotation of /trunk/pyvisi/test/python/test_plot.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 637 - (hide annotations)
Thu Mar 23 10:55:31 2006 UTC (14 years, 10 months ago) by gross
File MIME type: text/x-python
File size: 1697 byte(s)
more copyright statements added
1 gross 637 """
2     Class and functions for testing the Plot classes
3 cochrane 337
4 gross 637 @var __author__: name of author
5     @var __license__: licence agreement
6     @var __copyright__: copyrights
7     @var __url__: url entry point on documentation
8     @var __version__: version
9     @var __date__: date of the version
10     """
11 cochrane 337
12 gross 637 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
13     http://www.access.edu.au
14     Primary Business: Queensland, Australia"""
15     __license__="""Licensed under the Open Software License version 3.0
16     http://www.opensource.org/licenses/osl-3.0.php"""
17     __author__="Paul Cochrane"
18     __url__="http://www.iservo.edu.au/esys"
19     __version__="$Revision$"
20     __date__="$Date$"
21 cochrane 337
22     import unittest
23 gross 637
24 cochrane 337 import sys,os,string
25     here = os.getcwd() + '/../../'
26     sys.path.append(here)
27     from pyvisi import * # this should import all of the pyvisi stuff needed
28    
29     from ESyS import *
30     import Finley
31    
32    
33     class TestPlot(unittest.TestCase):
34     """
35     The main test class
36     """
37    
38     def testArrowPlotBases(self):
39     bases = "%s" % ArrowPlot.__bases__
40     self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>')
41    
42     def testArrowPlotSetData(self):
43     scene = Scene()
44     plot = scene.addArrowPlot()
45     data = Finley.Brick(3,5,7).Nodes().getX() # old esys!!
46     self.assert_(plot.setData(data),msg="Failed to set data in ArrowPlot")
47    
48     def testContourPlotBases(self):
49     bases = "%s" % ContourPlot.__bases__
50     self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>')
51    
52     def testLinePlotBases(self):
53     bases = "%s" % LinePlot.__bases__
54     self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>')
55    
56     if __name__ == '__main__':
57     unittest.main()
58    
59     # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26