[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/tests/dochttp.py
Collector #265: Failure in test_dochttp.py
Tim Peters
tim.one at comcast.net
Fri Aug 27 00:53:17 EDT 2004
Log message for revision 27286:
Collector #265: Failure in test_dochttp.py
At least test0001.response contains binary data, so must
be opened in binary mode on Windows.
I'm finding it impossible to add info to the collector issue
(error pages result), so here's what I tried to add there:
"""
Confirmed on WinXP w/ current Zope3 trunk.
Don't know what the test is trying to do, but it's almost certain
that the cause is opening binary files in text mode. That is, at
least test0001.response is opened in text mode, but contains at least
one largish blob of binary data following GIF89a.
dochttp.py and test_dochttp.py don't have the SVN eol-style:native
property set, so hard to read them here <wink>. The .response and
.request files don't have eol-style set either, so they're also
treated (by SVN) as binary files.
If I open them in binary mode, the test passes, so I'll check that
in (can't hurt on Linux).
Leaving this open so Jim figures out which of these files he intended
to be text and which binary.
"""
Changed:
U Zope3/trunk/src/zope/app/tests/dochttp.py
-=-
Modified: Zope3/trunk/src/zope/app/tests/dochttp.py
===================================================================
--- Zope3/trunk/src/zope/app/tests/dochttp.py 2004-08-26 20:14:32 UTC (rev 27285)
+++ Zope3/trunk/src/zope/app/tests/dochttp.py 2004-08-27 04:53:17 UTC (rev 27286)
@@ -82,11 +82,11 @@
for name in names:
requests = Requests(
- open(os.path.join(directory, name + ".request")),
+ open(os.path.join(directory, name + ".request"), 'rb'),
options.skip_request_header,
)
responses = Responses(
- open(os.path.join(directory, name + ".response")),
+ open(os.path.join(directory, name + ".response"), 'rb'),
options.skip_response_header,
)
More information about the Zope3-Checkins
mailing list