Enable full test suite with Python 3.#774
Conversation
|
Commit 19c5f32 fixed the last point on the PR description, which I have now removed. Also tests are able to download the latest SQLite database and therefore run faster. |
|
Down to 4 failures, I may need some help with those. |
|
Wow - thanks so much @nsoranzo - this is awesome. Trying to pick it up from here - I can replicate broadly the behavior here #765 with Python 3 now - the toolbox loads fine with Python 3 and |
|
Thanks! I tried to restart the test build a few times, but it keeps stalling at "Test testing a simple GA workflow with Galaxy" test. |
|
Working on it - locks up pretty quickly here. Looks like the output is fetched from Galaxy but nothing ends. Maybe killing the server and re-joining is broken in Python 3... hmm... |
|
This piece of code in galaxy-lib I suspect is the problem: if path is not None:
properties["path"] = path
f = open(path, "rb")
else:
f = StringIO(content)
try:
contents = f.read(1024 * 1024)
filesize = 0
while contents != "":
checksum.update(contents)
filesize += len(contents)
contents = f.read(1024 * 1024)
finally:
f.close() |
|
@jmchilton Given the file is opened in binary mode, and you want the raw length, then |
|
@peterjc Yup - that was exactly the fix - galaxyproject/galaxy-lib#93. I should have linked it against this PR. |
|
I think the only broken test here is a test that has been broken in master as we worked on this. Local conda packages maybe broke during the big galaxy-lib update or maybe broke due to Conda changes elsewhere. |
planemo/commands/cmd_project_init.py
Outdated
| shell("ls '%s'" % (template_dir)) | ||
| shell("mv '%s'/* '%s'" % (template_dir, path)) | ||
| shell(['ls', template_dir]) | ||
| shell(['mv', "%s/*" % template_dir, path]) |
There was a problem hiding this comment.
Thanks for the fix - the rest of this looks good but this line required the shell expansion to happen. Can I revert just this line or are you working on an approach that avoids shell to do this?
There was a problem hiding this comment.
Yep, this broke project_init tests. Rebased with a fixed (and shorter) version.
|
The jmchilton branch Travis finishes faster: 🎆 🎆 🎆 🎆 🎆 Thanks so much @nsoranzo - this is really awesome. I really appreciate all the work you put into this. |
Fix the following test:
```
$ nosetests tests/test_dependency_script.py
..F.....
======================================================================
FAIL: test_good_examples (tests.test_dependency_script.DependencyScriptTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/users/ga002/soranzon/software/nsoranzo_planemo/tests/test_dependency_script.py", line 79, in test_good_examples
self._check_exit_code(ds_cmd, 0)
File "/usr/users/ga002/soranzon/software/nsoranzo_planemo/tests/test_utils.py", line 100, in _check_exit_code
raise AssertionError(message)
...
-------------------- >> begin captured stdout << ---------------------
Command list output is [Downloading http://depot.galaxyproject.org/package/linux/i386/samtools/samtools-0.1.16-linux-i386.tgz to '/tmp/tmp8mq79eb0/download_cache/samtools-0.1.16-linux-i386.tgz'
Verifying checksum for samtools-0.1.16-linux-i386.tgz
Error processing /usr/users/ga002/soranzon/software/nsoranzo_planemo/tests/data/repos/package_1/tool_dependencies.xml - Checksum failure for /tmp/tmp8mq79eb0/download_cache/samtools-0.1.16-linux-i386.tgz, got b'7090bd62142df0ed3a2b4000292fc0edc917e773d0269c2f3f5b0d36b7888c22' but wanted '7090bd62142df0ed3a2b4000292fc0edc917e773d0269c2f3f5b0d36b7888c22'
...
```
Fixes galaxyproject#765 I think.
In the spirit of 3e46d71 but I'm not actually sure this fixes anything - at very least it shouldn't break anything.
Tweaking testing in a way that needs to be stripped out before merge but hoping to get some fresh Python 3 tracebacks on Travis to work from.
Problems:
Error processing /home/travis/build/galaxyproject/planemo/tests/data/repos/package_1/tool_dependencies.xml - Checksum failure for /tmp/tmph9zwo1rp/download_cache/samtools-0.1.16-linux-i386.tgz, got b'7090bd62142df0ed3a2b4000292fc0edc917e773d0269c2f3f5b0d36b7888c22' but wanted '7090bd62142df0ed3a2b4000292fc0edc917e773d0269c2f3f5b0d36b7888c22'Probably same problem as above?