1 |
cochrane |
337 |
# 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_image.py,v 1.2 2004/11/24 06:24:06 paultcochrane Exp $ |
18 |
|
|
|
19 |
|
|
## @file test_image.py |
20 |
|
|
|
21 |
|
|
import unittest |
22 |
|
|
import sys,os,string |
23 |
|
|
here = os.getcwd() + '/../../' |
24 |
|
|
sys.path.append(here) |
25 |
|
|
import pyvisi # 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 Image classes |
32 |
|
|
""" |
33 |
|
|
|
34 |
|
|
class TestImage(unittest.TestCase): |
35 |
|
|
""" |
36 |
|
|
The main test class |
37 |
|
|
""" |
38 |
|
|
|
39 |
|
|
def testExactlyOneArg(self): |
40 |
|
|
""" |
41 |
|
|
Tests that Image class is passed exactly one argument |
42 |
|
|
""" |
43 |
|
|
# this tests for no args passed |
44 |
|
|
self.assertRaises(TypeError, pyvisi.Image.__init__) |
45 |
|
|
# this tests for two args passed |
46 |
|
|
self.assertRaises(TypeError, pyvisi.Image.__init__, 'one', 'two') |
47 |
|
|
|
48 |
|
|
if __name__ == '__main__': |
49 |
|
|
unittest.main() |
50 |
|
|
|
51 |
|
|
# vim: expandtab shiftwidth=4: |