def get_installed_repository_info(elem, last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision, tool_path):
 tool_config_path = elem.get('file')
 installed_tool_path_items = tool_config_path.split('/repos/')
 sans_shed = installed_tool_path_items[1]
 path_items = sans_shed.split('/')
 repository_owner = path_items[0]
 repository_name = path_items[1]
 changeset_revision = path_items[2]
 if ((repository_name != last_tested_repository_name) or (changeset_revision != last_tested_changeset_revision)):
  installed_tool_path = os.path.join(installed_tool_path_items[0], 'repos', repository_owner, repository_name, changeset_revision)
  for (root, dirs, files) in os.walk(os.path.join(tool_path, installed_tool_path)):
   if ('.' in dirs):
    dirs.remove('.hg')
   if ('test-data' in dirs):
    return (os.path.join(root, 'test-data'), repository_name, changeset_revision)
  return (None, repository_name, changeset_revision)
 return (last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision)

def get_installed_repository_info ( elem , last_galaxy_test_file_dir , last_tested_repository_name , last_tested_changeset_revision , tool_path ) : tool_config_path = elem . get ( 'file' ) installed_tool_path_items = tool_config_path . split ( '/repos/' ) sans_shed = installed_tool_path_items [ 1 ] path_items = sans_shed . split ( '/' ) repository_owner = path_items [ 0 ] repository_name = path_items [ 1 ] changeset_revision = path_items [ 2 ] if ( ( repository_name != last_tested_repository_name ) or ( changeset_revision != last_tested_changeset_revision ) ) : installed_tool_path = os . path . join ( installed_tool_path_items [ 0 ] , 'repos' , repository_owner , repository_name , changeset_revision ) for ( root , dirs , files ) in os . walk ( os . path . join ( tool_path , installed_tool_path ) ) : if ( '.' in dirs ) : dirs . remove ( '.hg' ) if ( 'test-data' in dirs ) : return ( os . path . join ( root , 'test-data' ) , repository_name , changeset_revision ) return ( None , repository_name , changeset_revision ) return ( last_galaxy_test_file_dir , last_tested_repository_name , last_tested_changeset_revision )
return the galaxy_test_file_dir .