spack.test.util package

Submodules

spack.test.util.editor module

spack.test.util.editor.bad_exe(tmpdir_factory)
spack.test.util.editor.good_exe(tmpdir_factory)
spack.test.util.editor.nosuch_exe(tmpdir_factory)
spack.test.util.editor.test_editor_both_bad(nosuch_exe, vim_exe)
spack.test.util.editor.test_editor_no_visual(good_exe)
spack.test.util.editor.test_editor_no_visual_with_args(good_exe)
spack.test.util.editor.test_editor_visual(good_exe)
spack.test.util.editor.test_editor_visual_bad(good_exe, bad_exe)
spack.test.util.editor.test_find_exe_from_env_var(good_exe)
spack.test.util.editor.test_find_exe_from_env_var_bad_path(nosuch_exe)
spack.test.util.editor.test_find_exe_from_env_var_no_editor()
spack.test.util.editor.test_find_exe_from_env_var_with_args(good_exe)
spack.test.util.editor.vim_exe(tmpdir_factory)

spack.test.util.environment module

Test Spack’s environment utility functions.

spack.test.util.environment.deprioritize_system_paths()
spack.test.util.environment.prepare_environment_for_tests()
spack.test.util.environment.test_dump_environment(prepare_environment_for_tests, tmpdir)
spack.test.util.environment.test_env_flag(prepare_environment_for_tests)
spack.test.util.environment.test_filter_system_paths()
spack.test.util.environment.test_get_path(prepare_environment_for_tests)
spack.test.util.environment.test_is_system_path()
spack.test.util.environment.test_path_put_first(prepare_environment_for_tests)
spack.test.util.environment.test_path_set(prepare_environment_for_tests)
spack.test.util.environment.test_prune_duplicate_paths()
spack.test.util.environment.test_reverse_environment_modifications(working_env)

spack.test.util.executable module

spack.test.util.executable.test_read_unicode(tmpdir, working_env)
spack.test.util.executable.test_which(tmpdir)
spack.test.util.executable.test_which_relative_path_with_slash(tmpdir, working_env)
spack.test.util.executable.test_which_with_slash_ignores_path(tmpdir, working_env)

spack.test.util.file_cache module

Test Spack’s FileCache.

spack.test.util.file_cache.file_cache(tmpdir)

Returns a properly initialized FileCache instance

spack.test.util.file_cache.test_write_and_read_cache_file(file_cache)

Test writing then reading a cached file.

spack.test.util.file_cache.test_write_and_remove_cache_file(file_cache)

Test two write transactions on a cached file. Then try to remove an entry from it.

spack.test.util.log_parser module

spack.test.util.log_parser.test_log_parser(tmpdir)

spack.test.util.mock_package module

spack.test.util.mock_package.test_mock_package_possible_dependencies()
spack.test.util.mock_package.test_mock_repo_is_virtual()

spack.test.util.prefix module

Tests various features of spack.util.prefix.Prefix

spack.test.util.prefix.test_multilevel_attributes()

Test attributes of attributes, like prefix.share.man

spack.test.util.prefix.test_prefix_attributes()

Test normal prefix attributes like prefix.bin

spack.test.util.prefix.test_prefix_join()

Test prefix join prefix.join(...)

spack.test.util.prefix.test_string_like_behavior()

Test string-like behavior of the prefix object

spack.test.util.spack_lock_wrapper module

Tests for Spack’s wrapper module around llnl.util.lock.

spack.test.util.spack_lock_wrapper.test_disable_locking(tmpdir)

Ensure that locks do no real locking when disabled.

spack.test.util.spack_lock_wrapper.test_lock_checks_group(tmpdir)

Ensure lock checks work with a self-owned, non-self-group repo.

spack.test.util.spack_lock_wrapper.test_lock_checks_user(tmpdir)

Ensure lock checks work with a self-owned, self-group repo.

spack.test.util.spack_yaml module

spack.test.util.spack_yaml.check_blame(element, file_name, line=None)

Check that config blame config gets right file/line for an element.

This runs spack config blame config and scrapes the output for a particular YAML key. It thne checks that the requested file/line info is also on that line.

Line is optional; if it is None we just check for the file_name, which may just be a name for a special config scope like _builtin or command_line.

spack.test.util.spack_yaml.get_config_line(pattern, lines)

Get a configuration line that matches a particular pattern.

spack.test.util.spack_yaml.test_config_blame(config)

check blame info for elements in mock configuration.

spack.test.util.spack_yaml.test_config_blame_with_override(config)

check blame for an element from an override scope

spack.test.util.util_gpg module

spack.test.util.util_gpg.test_parse_gpg_output_case_one()
spack.test.util.util_gpg.test_parse_gpg_output_case_three()
spack.test.util.util_gpg.test_parse_gpg_output_case_two()
spack.test.util.util_gpg.test_really_long_gnupg_home_dir(tmpdir)

spack.test.util.util_string module

spack.test.util.util_string.test_plural()

spack.test.util.util_url module

Test Spack’s URL handling utility functions.

spack.test.util.util_url.test_url_join_absolute_paths()
spack.test.util.util_url.test_url_join_local_paths()
spack.test.util.util_url.test_url_local_file_path()
spack.test.util.util_url.test_url_parse()

Module contents