Skip to content
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

Cleanup of Unit Test Code for Loading Tools #4387

merged 5 commits into from Aug 16, 2017


None yet
4 participants
Copy link

commented Aug 8, 2017

  • Refactor code in for loading tools from path so it can be reused by test code to properly load tools.
  • Merge Carl's and my concept of MockApp - his was better so I merged my the properties needed for various tool testing into his.
  • Eliminate my attempts to mock out sqlalchemy in a few unit tests - it was a failed experiment. I've used an in-memory database for all subsequent unit tests and it has been much cleaner and produced more useful tests IMO.

Unit tests enhancements from my downstream work on CWL.

Eliminate second unit test variant of MockApp.
As well as my failed experiment in mocking out sqlalchemy - I think the in-memory database is more useful than mocking out sqlalchemy in retrospect.

@jmchilton jmchilton force-pushed the jmchilton:tool_unit_test_cleanup branch from d46b5c3 to a462afa Aug 8, 2017

@galaxybot galaxybot added this to the 17.09 milestone Aug 8, 2017

class MockAppConfig( Bunch ):

def __init__( self, root=None, **kwargs ):
Bunch.__init__( self, **kwargs )
root = root or '/tmp'

This comment has been minimized.

Copy link

mvdbeek Aug 14, 2017


would it make sense to use tempfile.mkdtemp instead of hardcoding /tmp ?

This comment has been minimized.

Copy link

jmchilton Aug 15, 2017

Author Member

We don't ... or at least shouldn't I don't think ... write anything here - I think it just needs to be a path that exists for the test cases. pwd doesn't quite work because it is an actual Galaxy root so it might mess with the tests a bit? I'm not sure to be honest but I'd like to avoid creating a directory for each test if we can to keep them as fast as possible.

@bgruening bgruening merged commit b6f0600 into galaxyproject:dev Aug 16, 2017

5 checks passed

api test Build finished. 280 tests run, 0 skipped, 0 failed.
continuous-integration/travis-ci/pr The Travis CI build passed
framework test Build finished. 150 tests run, 0 skipped, 0 failed.
integration test Build finished. 37 tests run, 0 skipped, 0 failed.
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.

This comment has been minimized.

Copy link

commented Aug 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.