-
Notifications
You must be signed in to change notification settings - Fork 91
Enable some Python 3 testing. #768
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
Conversation
Well that found a bunch of Python 3 bugs at least... |
Down to 2 failures! I have another commit ready that will fix the first once galaxyproject/galaxy-lib#89 is merged. |
A freshly minted galaxy-lib 17.9.12 has been pushed to PyPI with your fix, thanks a bunch! |
With corresponding fixes. - Fix unneeded decode in test_shed_upload. - Update to latest version of gxformat2 for Python 3 fixes (galaxyproject/gxformat2#1).
Fix the following error: ``` File "/home/travis/build/galaxyproject/planemo/planemo/database/postgres.py", line 27, in list_databases identifiers.append(line.split("|")[0].strip()) TypeError: 'str' does not support the buffer interface
Fix this failing test: ``` ====================================================================== FAIL: Test :func:`planemo.io.conditionally_captured_io`. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/galaxyproject/planemo/.tox/py34-quick/lib/python3.4/site-packages/nose/case.py", line 198, in runTest self.test(*self.arg) File "/home/travis/build/galaxyproject/planemo/tests/test_io.py", line 12, in test_io_capture assert_equal(capture[0]["data"], "Problem...") File "/home/travis/build/galaxyproject/planemo/tests/test_utils.py", line 235, in assert_equal assert a == b, "%s != %s" % (a, b) nose.proxy.AssertionError: Problem... != Problem... """Assert two things are equal.""" >> assert '\x1b[31mProblem...\x1b[0m' == 'Problem...', "%s != %s" % ('\x1b[31mProblem...\x1b[0m', 'Problem...') ```
Rebased and green! |
@@ -300,7 +300,7 @@ def _build_galaxy(**kwds): | |||
# process raw cite urls | |||
cite_urls = kwds.get("cite_url", []) | |||
del kwds["cite_url"] | |||
citations = map(UrlCitation, cite_urls) | |||
citations = list(map(UrlCitation, cite_urls)) |
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.
How about using a list comprehension here?
citations = [UrlCitation(url) for url in cite_urls]
Or, using the _
variable:
citations = [UrlCitation(_) for _ in cite_urls]
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.
Funnily we discussed this yesterday in a galaxy-lib
PR: galaxyproject/galaxy-lib#88 (comment)
Wonderful, wonderful - thanks so much @nsoranzo - this is amazing. |
Lets see if these pass on Travis.