helpers

Collection of helper functions used in conda tests.

Functions

strip_expected(stderr)

raises(exception, func[, string])

captured([disallow_stderr])

capture_json_with_argv(command[, disallow_stderr, ...])

set_active_prefix(→ None)

assert_equals(a, b[, output])

assert_not_in(a, b[, output])

assert_in(a, b[, output])

run_inprocess_conda_command(command[, disallow_stderr])

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, index)

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

_sync_channel_to_disk(channel, subdir_data, index)

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, channel, index)

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

get_index_r_1([subdir])

get_index_r_2([subdir])

get_index_r_4([subdir])

get_index_r_5([subdir])

get_index_must_unfreeze([subdir])

get_index_cuda([subdir])

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

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

EXPORTED_CHANNELS_DIR

expected_error_prefix

TEST_DATA_DIR
CHANNEL_DIR
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)
capture_json_with_argv(command, disallow_stderr=True, ignore_stderr=False, **kwargs)
set_active_prefix(prefix: str) None
assert_equals(a, b, output='')
assert_not_in(a, b, output='')
assert_in(a, b, output='')
run_inprocess_conda_command(command, disallow_stderr: bool = True)
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, index)

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(channel, subdir_data, index)

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, channel, index)

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_1(subdir=context.subdir)
get_index_r_2(subdir=context.subdir)
get_index_r_4(subdir=context.subdir)
get_index_r_5(subdir=context.subdir)
get_index_must_unfreeze(subdir=context.subdir)
get_index_cuda(subdir=context.subdir)
record(name='a', version='1.0', depends=None, build='0', build_number=0, timestamp=0, channel=None, **kwargs)
get_solver(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_2(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_4(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_5(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_aggregate_1(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_aggregate_2(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_must_unfreeze(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
get_solver_cuda(tmpdir, specs_to_add=(), specs_to_remove=(), prefix_records=(), history_specs=())
convert_to_dist_str(solution)
solver_class()