1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/11c30107da4e/ Changeset: 11c30107da4e User: inithello Date: 2013-12-20 18:55:49 Summary: Fix for removing generated test definitions from the global scope after a repository has been tested. Affected #: 1 file diff -r 68c080722bc7f6accf73325bdf049eb84125da27 -r 11c30107da4eba80c0e76613d1da223f2af8ffe8 test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py @@ -254,8 +254,6 @@ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) ) log.debug( 'Saved generated shed_tools_dict to %s\nContents: %s' % ( str( galaxy_shed_tools_dict ), str( shed_tools_dict ) ) ) - # Remove twills' old generated test before building the new tests for the current tools. - remove_tests( app ) try: install_and_test_statistics_dict = test_repository_tools( app, repository, @@ -570,6 +568,14 @@ """ tests_to_delete = [] tools_to_delete_by_id = [] + + # Push all the toolbox tests to module level + G = globals() + + # Eliminate all previous tests from G. + for key, val in G.items(): + if key.startswith( 'TestForTool_' ): + del G[ key ] global test_toolbox # Find all tests previously generated by twill. for key in test_toolbox.__dict__: @@ -590,17 +596,6 @@ if tool_id in app.toolbox.tools_by_id: log.debug( 'Deleting tool id %s from app.toolbox[ tools_by_id ].' % str( tool_id ) ) del app.toolbox.tools_by_id[ tool_id ] - # Push all the toolbox tests to module level - for key in test_install_repositories.__dict__: - if key.startswith( 'TestInstallRepository_' ): - log.debug( 'Repository installation process test %s discovered.' % str( key ) ) - # We can't delete this test just yet, we're still iterating over __dict__. - tests_to_delete.append( key ) - # Delete the discovered twill-generated tests. - for key in tests_to_delete: - if key in test_install_repositories.__dict__: - log.debug( 'Deleting test %s from test_toolbox.' % str( key ) ) - del test_install_repositories.__dict__[ key ] def test_repository_tools( app, repository, repository_dict, tool_test_results_dicts, tool_test_results_dict, install_and_test_statistics_dict ): @@ -674,6 +669,8 @@ can_update_tool_shed ) log.debug( 'Revision %s of repository %s owned by %s installed successfully but did not pass functional tests.' % \ ( changeset_revision, name, owner ) ) + # Remove twills' old generated test before building the new tests for the current tools. + remove_tests( app ) return install_and_test_statistics_dict if __name__ == "__main__": Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.