integration#

These helpers were originally defined in tests/test_create.py, but were refactored here so downstream projects can benefit from them too.

Classes#

Commands

Functions#

escape_for_winpath(p)

running_a_python_capable_of_unicode_subprocessing()

set_tmpdir(tmpdir)

_get_temp_prefix([name, use_restricted_unicode])

make_temp_prefix([name, use_restricted_unicode, ...])

When the env. you are creating will be used to install Python 2.7 on Windows

FORCE_temp_prefix([name, use_restricted_unicode])

temp_chdir(target_dir)

run_command(command, prefix, *arguments, **kwargs)

make_temp_env(*packages, **kwargs)

make_temp_package_cache()

make_temp_channel(packages)

create_temp_location()

tempdir()

reload_config(prefix)

package_is_installed(prefix, spec)

get_conda_list_tuple(prefix, package_name)

get_shortcut_dir([prefix_for_unix])

Attributes#

TEST_LOG_LEVEL

PYTHON_BINARY

BIN_DIRECTORY

UNICODE_CHARACTERS

UNICODE_CHARACTERS_RESTRICTED

which_or_where

cp_or_copy

env_or_set

SPACER_CHARACTER

tmpdir_in_use

TEST_LOG_LEVEL#
PYTHON_BINARY#
BIN_DIRECTORY#
UNICODE_CHARACTERS = 'ōγђ家固한áêñßôç'#
UNICODE_CHARACTERS_RESTRICTED = 'abcdef'#
which_or_where#
cp_or_copy#
env_or_set#
SPACER_CHARACTER = ' '#
escape_for_winpath(p)#
running_a_python_capable_of_unicode_subprocessing()#
tmpdir_in_use#
set_tmpdir(tmpdir)#
_get_temp_prefix(name=None, use_restricted_unicode=False)#
make_temp_prefix(name=None, use_restricted_unicode=False, _temp_prefix=None)#

When the env. you are creating will be used to install Python 2.7 on Windows only a restricted amount of Unicode will work, and probably only those chars in your current codepage, so the characters in UNICODE_CHARACTERS_RESTRICTED should probably be randomly generated from that instead. The problem here is that the current codepage needs to be able to handle 'sys.prefix' otherwise ntpath will fall over.

FORCE_temp_prefix(name=None, use_restricted_unicode=False)#
class Commands#
COMPARE = 'compare'#
CONFIG = 'config'#
CLEAN = 'clean'#
CREATE = 'create'#
INFO = 'info'#
INSTALL = 'install'#
LIST = 'list'#
REMOVE = 'remove'#
SEARCH = 'search'#
UPDATE = 'update'#
RUN = 'run'#
temp_chdir(target_dir)#
run_command(command, prefix, *arguments, **kwargs)#
make_temp_env(*packages, **kwargs)#
make_temp_package_cache()#
make_temp_channel(packages)#
create_temp_location()#
tempdir()#
reload_config(prefix)#
package_is_installed(prefix, spec)#
get_conda_list_tuple(prefix, package_name)#
get_shortcut_dir(prefix_for_unix=sys.prefix)#