zfec: disable the feature of leaving unit test tmp dirs lying around for post-mortem...
authorZooko O'Whielacronx zooko@zooko.com <zooko@zooko.com>
Wed, 9 May 2007 17:50:48 +0000 (23:20 +0530)
committerZooko O'Whielacronx zooko@zooko.com <zooko@zooko.com>
Wed, 9 May 2007 17:50:48 +0000 (23:20 +0530)
fixes #41 in the allmydata.org trac

http://allmydata.org/trac/tahoe/ticket/41

darcs-hash:a523b79db6fff6a9949b95e60e59826b2afdd6f6

zfec/zfec/test/test_zfec.py

index f7b7ecb294d1df786617f569a999dfb4f5fec539..3a76ddfe238ad0d122619c11f373f18bac2c37a1 100755 (executable)
@@ -123,7 +123,7 @@ class FileFec(unittest.TestCase):
 
         fsize = len(teststr)
 
-        tempdir = zfec.util.fileutil.NamedTemporaryDirectory(cleanup=False)
+        tempdir = zfec.util.fileutil.NamedTemporaryDirectory(cleanup=True)
         try:
             tempf = tempdir.file(TESTFNAME, 'w+b')
             tempf.write(teststr)
@@ -190,7 +190,7 @@ class FileFec(unittest.TestCase):
  
 class Cmdline(unittest.TestCase):
     def test_basic(self, noisy=VERBOSE):
-        tempdir = zfec.util.fileutil.NamedTemporaryDirectory(cleanup=False)
+        tempdir = zfec.util.fileutil.NamedTemporaryDirectory(cleanup=True)
         fo = tempdir.file("test.data", "w+b")
         fo.write("WHEHWHJEKWAHDLJAWDHWALKDHA")