]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
use the "binary" flag on open() for files that shouldn't have line-endings automatica...
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 4 Apr 2007 23:12:30 +0000 (16:12 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 4 Apr 2007 23:12:30 +0000 (16:12 -0700)
src/allmydata/test/test_filetree_new.py
src/allmydata/test/test_upload.py
src/allmydata/test/test_workqueue.py

index 4d478112d71588af0f0f01a0e6425005b67efd92..e1e0932a754bfdef21d22e1c1ab047bd17a7b65d 100644 (file)
@@ -565,7 +565,7 @@ class VDrive(unittest.TestCase):
         v = self.makeLocalTree("upload")
         filename = "upload1"
         DATA = "here is some data\n"
-        f = open(filename, "w")
+        f = open(filename, "wb")
         f.write(DATA)
         f.close()
 
@@ -592,7 +592,7 @@ class VDrive(unittest.TestCase):
     def testCHKDirUpload(self):
         DATA = "here is some data\n"
         filename = "upload1"
-        f = open(filename, "w")
+        f = open(filename, "wb")
         f.write(DATA)
         f.close()
 
@@ -624,7 +624,7 @@ class VDrive(unittest.TestCase):
     def testCHKDirDelete(self):
         DATA = "here is some data\n"
         filename = "upload1"
-        f = open(filename, "w")
+        f = open(filename, "wb")
         f.write(DATA)
         f.close()
 
index 5eb9b540a77e760c89cf4193c54d454da7b5cad3..dc05d7666661d12f48e8c9299e98e7e240360505 100644 (file)
@@ -43,7 +43,7 @@ class GoodServer(unittest.TestCase):
 
     def testFilename(self):
         fn = "Uploader-testFilename.data"
-        f = open(fn, "w")
+        f = open(fn, "wb")
         data = "This is some data to upload"
         f.write(data)
         f.close()
index ab151a2c9b5ba899eab2f2138719965bc43695b5..6f205948d774029a801eb580cab39fef8b96bffc 100644 (file)
@@ -28,7 +28,7 @@ class Reuse(unittest.TestCase):
         # files in the tmpdir are not: these are either in the process of
         # being added or in the process of being removed.
         tmpfile = os.path.join(wq.tmpdir, "foo")
-        f = open(tmpfile, "w")
+        f = open(tmpfile, "wb")
         f.write("foo")
         f.close()
         # files created with create_tempfile *are* retained, however