-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some buildbot tests under Python 3 #2610
Conversation
@rodrigc, thanks for your PR! By analyzing the history of the files in this pull request, we identified @douglatornell, @djmitche and @tardyp to be potential reviewers. |
@@ -812,7 +813,8 @@ def addLogWithFailure(self, why, logprefix=""): | |||
# helper for showing exceptions to the users | |||
try: | |||
yield self.addCompleteLog(logprefix + "err.text", why.getTraceback()) | |||
yield self.addHTMLLog(logprefix + "err.html", formatFailure(why)) | |||
yield self.addHTMLLog(logprefix + "err.html", | |||
bytes2NativeString(formatFailure(why))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect addHTMLLog to do the ascii2unicode by itself (will probably save you a lot of fixes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I made the change.
cStringIO is gone in Python 3
cStringIO is gone in Python 3
cStringIO is gone in Python 3
cStringIO is gone in Python 3
StringIO.StringIO is gone in Python 3
On Python 3, map() returns a generator, not a list. This eliminates these errors on Python 3: "'map' object is not subscriptable"
stringified representation of the json. In Python 2 and Python 3, the order of the dictionary is different, so this was causing the stringified json to be in a slightly different order on Python 3, causing the test to fail.
This fixes errors on Python 3
This fixes errors on Python 3
This fixes problems on Python 3
…rors on Python 3. Refactor into helper function.
This fixes errors on Python 3
sorry, I've been struggling with the CI instabilities. need to make sure everything is okay |
These tests now work under Python 3: