@skip_unless_environ('GALAXY_TEST_INCLUDE_SLOW')
def test_conda_resolution_failure():
 base_path = mkdtemp(prefix=('x' * 80))
 try:
  job_dir = os.path.join(base_path, '000')
  dependency_manager = DependencyManager(base_path)
  resolver = CondaDependencyResolver(dependency_manager, auto_init=True, auto_install=True, use_path_exec=False)
  conda_context = resolver.conda_context
  assert (len(list(conda_util.installed_conda_targets(conda_context))) == 0)
  dependency = resolver.resolve(name='samtools', version=None, type='package', job_directory=job_dir)
  assert (dependency.shell_commands(None) is None)
  installed_targets = list(conda_util.installed_conda_targets(conda_context))
  assert (len(installed_targets) == 0)
 finally:
  shutil.rmtree(base_path)

@ skip_unless_environ ( 'GALAXY_TEST_INCLUDE_SLOW' ) def test_conda_resolution_failure ( ) : base_path = mkdtemp ( prefix = ( 'x' * 80 ) ) try : job_dir = os . path . join ( base_path , '000' ) dependency_manager = DependencyManager ( base_path ) resolver = CondaDependencyResolver ( dependency_manager , auto_init = True , auto_install = True , use_path_exec = False ) conda_context = resolver . conda_context assert ( len ( list ( conda_util . installed_conda_targets ( conda_context ) ) ) == 0 ) dependency = resolver . resolve ( name = 'samtools' , version = None , type = 'package' , job_directory = job_dir ) assert ( dependency . shell_commands ( None ) is None ) installed_targets = list ( conda_util . installed_conda_targets ( conda_context ) ) assert ( len ( installed_targets ) == 0 ) finally : shutil . rmtree ( base_path )
this test is specifically designed to trigger URL and thus it expects the install to fail .