[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol/tests - test_zodbcontrol.py:1.2

Fred L. Drake, Jr. fred at zope.com
Tue Aug 26 13:22:32 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/applicationcontrol/tests
In directory cvs.zope.org:/tmp/cvs-serv859

Modified Files:
	test_zodbcontrol.py 
Log Message:
- make these tests clean up after themselves
- normalize whitespace


=== Zope3/src/zope/app/applicationcontrol/tests/test_zodbcontrol.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/applicationcontrol/tests/test_zodbcontrol.py:1.1	Thu Jul 31 17:37:23 2003
+++ Zope3/src/zope/app/applicationcontrol/tests/test_zodbcontrol.py	Tue Aug 26 12:22:31 2003
@@ -19,8 +19,8 @@
 
 from zodb.storage.file import FileStorage
 from zodb.db import DB
-from zope.app.applicationcontrol import tests 
-from zope.app.applicationcontrol.zodbcontrol import ZODBControl 
+from zope.app.applicationcontrol import tests
+from zope.app.applicationcontrol.zodbcontrol import ZODBControl
 from zope.app.applicationcontrol.applicationcontrol import applicationController
 
 
@@ -28,17 +28,20 @@
 
     def setUp(self):
         db_file = os.path.join(os.path.dirname(tests.__file__), 'zodb.fs')
-        self.db = DB(FileStorage(db_file), '')
+        self.storage = FileStorage(db_file)
+        self.db = DB(self.storage, '')
         self.control = ZODBControl(applicationController)
 
+    def tearDown(self):
+        self.db.close()
+        self.storage.cleanup()
+
     def test_getDatabaseSize(self):
         self.assertEqual(self.control.getDatabaseSize(self.db), 1183)
 
 
 def test_suite():
-    return unittest.TestSuite((
-        unittest.makeSuite(Test),
-        ))
+    return unittest.makeSuite(Test)
 
 if __name__ == '__main__':
     unittest.main()




More information about the Zope3-Checkins mailing list