comparison test/test_init.py @ 742:b105b46f6324

'I must run unit tests before committing\n' * 100
author Richard Jones <richard@users.sourceforge.net>
date Thu, 23 May 2002 04:26:05 +0000
parents e10c37f53efd
children dc05d4531f81
comparison
equal deleted inserted replaced
741:b48a19a88b65 742:b105b46f6324
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_init.py,v 1.8 2002-05-15 03:27:16 richard Exp $ 18 # $Id: test_init.py,v 1.9 2002-05-23 04:26:05 richard Exp $
19 19
20 import unittest, os, shutil, errno, imp, sys 20 import unittest, os, shutil, errno, imp, sys
21 21
22 from roundup.init import init 22 from roundup import init
23 23
24 class MyTestCase(unittest.TestCase): 24 class MyTestCase(unittest.TestCase):
25 count = 0 25 count = 0
26 def setUp(self): 26 def setUp(self):
27 MyTestCase.count = MyTestCase.count + 1 27 MyTestCase.count = MyTestCase.count + 1
41 backend = 'anydbm' 41 backend = 'anydbm'
42 def testCreation(self): 42 def testCreation(self):
43 ae = self.assertEqual 43 ae = self.assertEqual
44 44
45 # create the instance 45 # create the instance
46 init(self.dirname, 'classic', self.backend, 'sekrit') 46 init.install(self.dirname, 'classic', self.backend)
47 init.initialise(self.dirname, 'sekrit')
47 48
48 # check we can load the package 49 # check we can load the package
49 instance = imp.load_package(self.dirname, self.dirname) 50 instance = imp.load_package(self.dirname, self.dirname)
50 51
51 # and open the database 52 # and open the database
71 backend = 'anydbm' 72 backend = 'anydbm'
72 def testCreation(self): 73 def testCreation(self):
73 ae = self.assertEqual 74 ae = self.assertEqual
74 75
75 # create the instance 76 # create the instance
76 init(self.dirname, 'extended', self.backend, 'sekrit') 77 init.install(self.dirname, 'extended', self.backend)
78 init.initialise(self.dirname, 'sekrit')
77 79
78 # check we can load the package 80 # check we can load the package
79 instance = imp.load_package(self.dirname, self.dirname) 81 instance = imp.load_package(self.dirname, self.dirname)
80 82
81 # and open the database 83 # and open the database
136 138
137 return unittest.TestSuite(l) 139 return unittest.TestSuite(l)
138 140
139 # 141 #
140 # $Log: not supported by cvs2svn $ 142 # $Log: not supported by cvs2svn $
143 # Revision 1.8 2002/05/15 03:27:16 richard
144 # . fixed SCRIPT_NAME in ZRoundup for instances not at top level of Zope
145 # (thanks dman)
146 # . fixed some sorting issues that were breaking some unit tests under py2.2
147 # . mailgw test output dir was confusing the init test (but only on 2.2 *shrug*)
148 #
149 # fixed bug in the init unit test that meant only the bsddb test ran if it
150 # could (it clobbered the anydbm test)
151 #
141 # Revision 1.7 2001/10/28 22:51:38 richard 152 # Revision 1.7 2001/10/28 22:51:38 richard
142 # Fixed ENOENT/WindowsError thing, thanks Juergen Hermann 153 # Fixed ENOENT/WindowsError thing, thanks Juergen Hermann
143 # 154 #
144 # Revision 1.6 2001/09/29 23:48:06 richard 155 # Revision 1.6 2001/09/29 23:48:06 richard
145 # Bug fix for test_init on Windows. 156 # Bug fix for test_init on Windows.

Roundup Issue Tracker: http://roundup-tracker.org/