helpers#

Collection of helper functions used in conda tests.

Functions#

strip_expected(stderr)

raises(exception, func[, string])

captured([disallow_stderr])

set_active_prefix(→ None)

assert_equals(a, b[, output])

assert_not_in(a, b[, output])

assert_in(a, b[, output])

add_subdir(dist_string)

add_subdir_to_iter(iterable)

tempdir()

supplement_index_with_repodata(index, repodata, ...)

add_feature_records_legacy(index)

_export_subdir_data_to_repodata(subdir_data)

This function is only temporary and meant to patch wrong / undesirable

_sync_channel_to_disk(subdir_data)

This function is only temporary and meant to patch wrong / undesirable

_alias_canonical_channel_name_cache_to_file_prefixed(name)

This function is only temporary and meant to patch wrong / undesirable

_patch_for_local_exports(name, subdir_data)

This function is only temporary and meant to patch wrong / undesirable

_get_index_r_base(json_filename_or_packages, channel_name)

get_index_r_1([subdir, add_pip, merge_noarch])

get_index_r_2([subdir, add_pip, merge_noarch])

get_index_r_4([subdir, add_pip, merge_noarch])

get_index_r_5([subdir, add_pip, merge_noarch])

get_index_must_unfreeze([subdir, add_pip, merge_noarch])

get_index_cuda([subdir, add_pip, merge_noarch])

record([name, version, depends, build, build_number, ...])

_get_solver_base(channel_id, tmpdir[, specs_to_add, ...])

get_solver(tmpdir[, specs_to_add, specs_to_remove, ...])

get_solver_2(tmpdir[, specs_to_add, specs_to_remove, ...])

get_solver_4(tmpdir[, specs_to_add, specs_to_remove, ...])

get_solver_5(tmpdir[, specs_to_add, specs_to_remove, ...])

get_solver_aggregate_1(tmpdir[, specs_to_add, ...])

get_solver_aggregate_2(tmpdir[, specs_to_add, ...])

get_solver_must_unfreeze(tmpdir[, specs_to_add, ...])

get_solver_cuda(tmpdir[, specs_to_add, ...])

convert_to_dist_str(solution)

solver_class()

Attributes#

TEST_DATA_DIR

CHANNEL_DIR_V2

EXPORTED_CHANNELS_DIR

expected_error_prefix

TEST_DATA_DIR#
CHANNEL_DIR_V2#
EXPORTED_CHANNELS_DIR#
expected_error_prefix = 'Using Anaconda Cloud api site https://api.anaconda.org'#
strip_expected(stderr)#
raises(exception, func, string=None)#
captured(disallow_stderr=True)#
set_active_prefix(prefix: str) None#
assert_equals(a, b, output='')#
assert_not_in(a, b, output='')#
assert_in(a, b, output='')#
add_subdir(dist_string)#
add_subdir_to_iter(iterable)#
tempdir()#
supplement_index_with_repodata(index, repodata, channel, priority)#
add_feature_records_legacy(index)#
_export_subdir_data_to_repodata(subdir_data: conda.core.subdir_data.SubdirData)#

This function is only temporary and meant to patch wrong / undesirable testing behaviour. It should end up being replaced with the new class-based, backend-agnostic solver tests.

_sync_channel_to_disk(subdir_data: conda.core.subdir_data.SubdirData)#

This function is only temporary and meant to patch wrong / undesirable testing behaviour. It should end up being replaced with the new class-based, backend-agnostic solver tests.

_alias_canonical_channel_name_cache_to_file_prefixed(name, subdir_data=None)#

This function is only temporary and meant to patch wrong / undesirable testing behaviour. It should end up being replaced with the new class-based, backend-agnostic solver tests.

_patch_for_local_exports(name, subdir_data)#

This function is only temporary and meant to patch wrong / undesirable testing behaviour. It should end up being replaced with the new class-based, backend-agnostic solver tests.

_get_index_r_base(json_filename_or_packages, channel_name, subdir=context.subdir, add_pip=False, merge_noarch=False)#
get_index_r_1(subdir=context.subdir, add_pip=True, merge_noarch=False)#
get_index_r_2(subdir=context.subdir, add_pip=True, merge_noarch=False)#
get_index_r_4(subdir=context.subdir, add_pip=True, merge_noarch=False)#
get_index_r_5(subdir=context.subdir, add_pip=False, merge_noarch=False)#
get_index_must_unfreeze(subdir=context.subdir, add_pip=True, merge_noarch=False)#
get_index_cuda(subdir=context.subdir, add_pip=True, merge_noarch=False)#
record(name='a', version='1.0', depends=None, build='0', build_number=0, timestamp=0, channel=None, **kwargs)#
_get_solver_base(channel_id, tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_2(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_4(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_5(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_aggregate_1(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_aggregate_2(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_must_unfreeze(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
get_solver_cuda(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=(), add_pip=False, merge_noarch=False)#
convert_to_dist_str(solution)#
solver_class()#