Enable some Python 3 testing.#768
Merged
jmchilton merged 8 commits intogalaxyproject:masterfrom Feb 23, 2018
Merged
Conversation
Member
Author
|
Well that found a bunch of Python 3 bugs at least... |
Member
|
Down to 2 failures! I have another commit ready that will fix the first once galaxyproject/galaxy-lib#89 is merged. |
Member
Author
|
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...')
```
Member
|
Rebased and green! |
peterjc
reviewed
Feb 23, 2018
| cite_urls = kwds.get("cite_url", []) | ||
| del kwds["cite_url"] | ||
| citations = map(UrlCitation, cite_urls) | ||
| citations = list(map(UrlCitation, cite_urls)) |
Contributor
There was a problem hiding this comment.
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]
Member
There was a problem hiding this comment.
Funnily we discussed this yesterday in a galaxy-lib PR: galaxyproject/galaxy-lib#88 (comment)
Member
Author
|
Wonderful, wonderful - thanks so much @nsoranzo - this is amazing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets see if these pass on Travis.