Skip to content

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

Merged
merged 8 commits into from
Feb 23, 2018
Merged

Conversation

jmchilton
Copy link
Member

Lets see if these pass on Travis.

@jmchilton
Copy link
Member Author

Well that found a bunch of Python 3 bugs at least...

@nsoranzo
Copy link
Member

Down to 2 failures! I have another commit ready that will fix the first once galaxyproject/galaxy-lib#89 is merged.

@jmchilton
Copy link
Member Author

A freshly minted galaxy-lib 17.9.12 has been pushed to PyPI with your fix, thanks a bunch!

jmchilton and others added 8 commits February 23, 2018 09:52
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...')
```
@nsoranzo
Copy link
Member

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))
Copy link
Contributor

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]

Copy link
Member

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)

@jmchilton jmchilton merged commit e074e70 into galaxyproject:master Feb 23, 2018
@jmchilton
Copy link
Member Author

Wonderful, wonderful - thanks so much @nsoranzo - this is amazing.

@jmchilton jmchilton changed the title Try enabling more Python 3 testing. Enabling some Python 3 testing. Feb 23, 2018
@jmchilton jmchilton changed the title Enabling some Python 3 testing. Enable some Python 3 testing. Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants