1 |
# Copyright (C) 2004 Paul Cochrane |
2 |
# |
3 |
# This program is free software; you can redistribute it and/or |
4 |
# modify it under the terms of the GNU General Public License |
5 |
# as published by the Free Software Foundation; either version 2 |
6 |
# of the License, or (at your option) any later version. |
7 |
# |
8 |
# This program is distributed in the hope that it will be useful, |
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 |
# GNU General Public License for more details. |
12 |
# |
13 |
# You should have received a copy of the GNU General Public License |
14 |
# along with this program; if not, write to the Free Software |
15 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
16 |
|
17 |
# $Id: test_plot.py,v 1.2 2004/11/24 06:24:06 paultcochrane Exp $ |
18 |
|
19 |
## @file test_plot.py |
20 |
|
21 |
import unittest |
22 |
import sys,os,string |
23 |
here = os.getcwd() + '/../../' |
24 |
sys.path.append(here) |
25 |
from pyvisi import * # this should import all of the pyvisi stuff needed |
26 |
|
27 |
from ESyS import * |
28 |
import Finley |
29 |
|
30 |
""" |
31 |
Class and functions for testing the Plot classes |
32 |
""" |
33 |
|
34 |
class TestPlot(unittest.TestCase): |
35 |
""" |
36 |
The main test class |
37 |
""" |
38 |
|
39 |
def testArrowPlotBases(self): |
40 |
bases = "%s" % ArrowPlot.__bases__ |
41 |
self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>') |
42 |
|
43 |
def testArrowPlotSetData(self): |
44 |
scene = Scene() |
45 |
plot = scene.addArrowPlot() |
46 |
data = Finley.Brick(3,5,7).Nodes().getX() # old esys!! |
47 |
self.assert_(plot.setData(data),msg="Failed to set data in ArrowPlot") |
48 |
|
49 |
def testContourPlotBases(self): |
50 |
bases = "%s" % ContourPlot.__bases__ |
51 |
self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>') |
52 |
|
53 |
def testLinePlotBases(self): |
54 |
bases = "%s" % LinePlot.__bases__ |
55 |
self.assertEqual(bases, '<class \'pyvisi.scene.Plot\'>') |
56 |
|
57 |
if __name__ == '__main__': |
58 |
unittest.main() |
59 |
|
60 |
# vim: expandtab shiftwidth=4: |