Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_cgi.py @ 42930:cbd50ece3b61
Make test_cgi pass. I changed the internal file created by make_file()
to be a text file. (XXX It should use UTF-8 as the encoding.)
I also removed the unised 'binary' argument from the make_file() signature.
XXX I am under no illusion that this is now working; I're pretty sure
it would be more principled if it always read binary data. But that's
for someone who actually cares about this module.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 28 Aug 2007 03:11:34 +0000 |
| parents | cb28e14ee808 |
| children | 9834301a2fd3 |
line wrap: on
line diff
--- a/Lib/test/test_cgi.py Tue Aug 28 01:07:27 2007 +0000 +++ b/Lib/test/test_cgi.py Tue Aug 28 03:11:34 2007 +0000 @@ -231,8 +231,8 @@ setattr(self, name, a) return a - f = TestReadlineFile(tempfile.TemporaryFile()) - f.write(b'x' * 256 * 1024) + f = TestReadlineFile(tempfile.TemporaryFile("w+")) + f.write('x' * 256 * 1024) f.seek(0) env = {'REQUEST_METHOD':'PUT'} fs = cgi.FieldStorage(fp=f, environ=env)
