summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-25 15:01:05 (GMT)
committerGuido van Rossum <guido@python.org>2003-04-25 15:01:05 (GMT)
commit51735b0569e4bff3f9a2988f0273cd5f1e3ec471 (patch)
treee549f8f2d16f8488071de3e54dcde92f23eb4cf4 /Lib/test/test_urllib.py
parent6eb502f2675943806d410d813b8f6c84e10759b3 (diff)
downloadcpython-51735b0569e4bff3f9a2988f0273cd5f1e3ec471.zip
cpython-51735b0569e4bff3f9a2988f0273cd5f1e3ec471.tar.gz
cpython-51735b0569e4bff3f9a2988f0273cd5f1e3ec471.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 6725289..7d557a1 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -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: