[Zodb-checkins] CVS: ZODB3/ZConfig/tests - testStorage.py:1.4

Barry Warsaw barry@wooz.org
Fri, 22 Nov 2002 15:34:27 -0500


Update of /cvs-repository/ZODB3/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv29497

Modified Files:
	testStorage.py 
Log Message:
tearDown(): Cheap and dirty removal of the directory that
testFullStorage() creates.


=== ZODB3/ZConfig/tests/testStorage.py 1.3 => 1.4 ===
--- ZODB3/ZConfig/tests/testStorage.py:1.3	Fri Nov 22 15:08:31 2002
+++ ZODB3/ZConfig/tests/testStorage.py	Fri Nov 22 15:34:26 2002
@@ -23,7 +23,12 @@
         except:
             pass
         try:
-            os.remove(self.tmpfn)
+            # Full storage creates a directory
+            if os.path.isdir(self.tmpfn):
+                # XXX Doesn't work on Window
+                os.system('rm -rf %s' % self.tmpfn)
+            else:
+                os.remove(self.tmpfn)
         except os.error:
             pass