commit/galaxy-central: inithello: Fix mismatch between tool id and test id when deleting tests/uninstalling tested repositories.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3790a81856bf/ Changeset: 3790a81856bf User: inithello Date: 2013-05-06 22:57:57 Summary: Fix mismatch between tool id and test id when deleting tests/uninstalling tested repositories. Affected #: 1 file diff -r bcb6e71eda61f77426af60cbc854231b00ecabc3 -r 3790a81856bf4a8b1fc6b6075c467ce813155b2a test/install_and_test_tool_shed_repositories/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/functional_tests.py @@ -196,6 +196,7 @@ name = str( repository.name ) owner = str( repository.owner ) changeset_revision = str( repository.installed_changeset_revision ) + log.debug( 'Changeset revision %s of repository %s queued for uninstallation.' % ( changeset_revision, name ) ) repository_dict = dict( name=name, owner=owner, changeset_revision=changeset_revision ) # Generate a test method to uninstall this repository through the embedded Galaxy application's web interface. test_install_repositories.generate_uninstall_method( repository_dict ) @@ -321,6 +322,7 @@ # and try to re-run the tests after uninstalling the repository, which will cause false failure reports, # since the test data has been deleted from disk by now. tests_to_delete = [] + tools_to_delete = [] global test_toolbox for key in test_toolbox.__dict__: if key.startswith( 'TestForTool_' ): @@ -328,12 +330,14 @@ # We can't delete this test just yet, we're still iterating over __dict__. tests_to_delete.append( key ) tool_id = key.replace( 'TestForTool_', '' ) - if tool_id in app.toolbox.tools_by_id: - # But we can remove the relevant tool from app.toolbox.tools_by_id. - del app.toolbox.tools_by_id[ tool_id ] + for tool in app.toolbox.tools_by_id: + if tool.replace( '_', ' ' ) == tool_id.replace( '_', ' ' ): + tools_to_delete.append( tool ) for key in tests_to_delete: # Now delete the tests found in the previous loop. del test_toolbox.__dict__[ key ] + for tool in tools_to_delete: + del app.toolbox.tools_by_id[ tool ] def run_tests( test_config ): loader = nose.loader.TestLoader( config=test_config ) 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.
participants (1)
-
commits-noreply@bitbucket.org