Fix the tests on Windows, by writing the test data file in binary

mode.

XXX I'm not convinced that this is the right solution -- arguably,
on Windows, the _fileobject class should honor the mode argument
and do newline translation.  But it's never done that so I think
there's no urgent need to fix this today.
This commit is contained in:
Guido van Rossum 2003-04-25 15:01:05 +00:00
parent 6eb502f267
commit 51735b0569
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class urlopen_FileTests(unittest.TestCase):
def setUp(self):
"""Setup of a temp file to use for testing"""
self.text = "test_urllib: %s\n" % self.__class__.__name__
FILE = file(test_support.TESTFN, 'w')
FILE = file(test_support.TESTFN, 'wb')
try:
FILE.write(self.text)
finally: