mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
use the "binary" flag on open() for files that shouldn't have line-endings automatically converted
This commit is contained in:
parent
01502ce665
commit
223bf98992
@ -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()
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user