spack.test.cmd package

Submodules

spack.test.cmd.activate module

spack.test.cmd.activate.test_activate(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.activate.test_deactivate(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.activate.test_deactivate_all(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]

spack.test.cmd.analyze module

spack.test.cmd.analyze.test_analyze_output(tmpdir, mock_fetch, install_mockery_mutable_config)[source]

Test that an analyzer errors if requested name does not exist.

spack.test.cmd.analyze.test_analyzer_get_install_dir(mock_fetch, install_mockery_mutable_config)[source]

Test that we cannot get an analyzer directory without a spec package.

spack.test.cmd.analyze.test_configargs_analyzer(tmpdir, mock_fetch, install_mockery_mutable_config)[source]

test the config args analyzer.

Since we don’t have any, this should return an empty result.

spack.test.cmd.analyze.test_environment_analyzer(tmpdir, mock_fetch, install_mockery_mutable_config)[source]

test the environment variables analyzer.

spack.test.cmd.analyze.test_installfiles_analyzer(tmpdir, mock_fetch, install_mockery_mutable_config)[source]

test the install files analyzer

spack.test.cmd.analyze.test_list_analyzers()[source]

test that listing analyzers shows all the possible analyzers.

spack.test.cmd.analyze.test_malformed_analyzer(mock_fetch, install_mockery_mutable_config)[source]

Test that an analyzer missing needed attributes is invalid.

spack.test.cmd.analyze.test_test_package_not_installed(mock_fetch, install_mockery_mutable_config)[source]

spack.test.cmd.arch module

spack.test.cmd.arch.test_arch()[source]

Sanity check spack arch to make sure it works.

spack.test.cmd.arch.test_arch_operating_system()[source]

Sanity check spack arch --operating-system to make sure it works.

spack.test.cmd.arch.test_arch_platform()[source]

Sanity check spack arch --platform to make sure it works.

spack.test.cmd.arch.test_arch_target()[source]

Sanity check spack arch --target to make sure it works.

spack.test.cmd.arch.test_display_targets()[source]

spack.test.cmd.audit module

spack.test.cmd.audit.test_audit_configs(mutable_config, mock_packages)[source]

Sanity check spack audit packages to make sure it works.

spack.test.cmd.audit.test_audit_packages(pkgs, expected_returncode, mutable_config, mock_packages)[source]

Sanity check spack audit packages to make sure it works.

spack.test.cmd.audit.test_audit_packages_https(mutable_config, mock_packages)[source]

spack.test.cmd.blame module

spack.test.cmd.blame.test_blame_by_git(mock_packages, capfd)[source]

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_by_modtime(mock_packages)[source]

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_by_percent(mock_packages)[source]

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_file(mock_packages)[source]

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_json(mock_packages)[source]

Ensure that we can output json as a blame.

spack.test.cmd.bootstrap module

spack.test.cmd.bootstrap.test_enable_and_disable(mutable_config, scope)[source]
spack.test.cmd.bootstrap.test_list_sources(capsys)[source]
spack.test.cmd.bootstrap.test_reset_in_environment(mutable_mock_env_path, mutable_config)[source]
spack.test.cmd.bootstrap.test_reset_in_file_scopes(mutable_config, scopes)[source]
spack.test.cmd.bootstrap.test_reset_in_file_scopes_overwrites_backup_files(mutable_config)[source]
spack.test.cmd.bootstrap.test_root_get_and_set(mutable_config, scope)[source]
spack.test.cmd.bootstrap.test_trust_or_untrust_fails_with_more_than_one_method(mutable_config)[source]
spack.test.cmd.bootstrap.test_trust_or_untrust_fails_with_no_method(mutable_config)[source]
spack.test.cmd.bootstrap.test_trust_or_untrust_sources(mutable_config, command, value)[source]

spack.test.cmd.build_env module

spack.test.cmd.build_env.test_build_env_requires_a_spec(args)[source]
spack.test.cmd.build_env.test_dump(tmpdir)[source]
spack.test.cmd.build_env.test_error_when_multiple_specs_are_given()[source]
spack.test.cmd.build_env.test_it_just_runs(pkg)[source]
spack.test.cmd.build_env.test_pickle(tmpdir)[source]

spack.test.cmd.buildcache module

spack.test.cmd.buildcache.mock_get_specs(database, monkeypatch)[source]
spack.test.cmd.buildcache.mock_get_specs_multiarch(database, monkeypatch)[source]
spack.test.cmd.buildcache.test_buildcache_create_fail_on_perm_denied(install_mockery, mock_fetch, monkeypatch, tmpdir)[source]

Ensure that buildcache create fails on permission denied error.

spack.test.cmd.buildcache.test_buildcache_create_fails_on_noargs(tmpdir)[source]

Ensure that buildcache create fails when given no args or environment.

spack.test.cmd.buildcache.test_buildcache_create_install(mutable_mock_env_path, install_mockery_mutable_config, mock_packages, mock_fetch, mock_stage, monkeypatch, tmpdir)[source]

“Ensure that buildcache create creates output files

spack.test.cmd.buildcache.test_buildcache_list_allarch(database, mock_get_specs_multiarch, capsys)[source]
spack.test.cmd.buildcache.test_buildcache_list_duplicates(mock_get_specs, capsys)[source]
spack.test.cmd.buildcache.test_buildcache_preview_just_runs(database)[source]
spack.test.cmd.buildcache.test_buildcache_sync(mutable_mock_env_path, install_mockery_mutable_config, mock_packages, mock_fetch, mock_stage, tmpdir)[source]

Make sure buildcache sync works in an environment-aware manner, ignoring any specs that may be in the mirror but not in the environment.

spack.test.cmd.buildcache.test_update_key_index(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, mock_fetch, mock_stage, mock_gnupghome)[source]

Test the update-index command with the –keys option

spack.test.cmd.buildcache.tests_buildcache_create(install_mockery, mock_fetch, monkeypatch, tmpdir)[source]

“Ensure that buildcache create creates output files

spack.test.cmd.buildcache.tests_buildcache_create_env(install_mockery, mock_fetch, monkeypatch, tmpdir, mutable_mock_env_path)[source]

“Ensure that buildcache create creates output files from env

spack.test.cmd.cd module

spack.test.cmd.cd.test_cd()[source]

Sanity check the cd command to make sure it works.

spack.test.cmd.checksum module

spack.test.cmd.checksum.test_checksum(arguments, expected, mock_packages, mock_stage)[source]
spack.test.cmd.checksum.test_checksum_args(arguments, expected)[source]
spack.test.cmd.checksum.test_checksum_interactive(mock_packages, mock_fetch, mock_stage, monkeypatch)[source]
spack.test.cmd.checksum.test_checksum_versions(mock_packages, mock_fetch, mock_stage)[source]

spack.test.cmd.ci module

spack.test.cmd.ci.project_dir_env()[source]
spack.test.cmd.ci.set_env_var(key, val)[source]
spack.test.cmd.ci.test_ci_generate_bootstrap_artifacts_buildcache(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env)[source]

Test that we can bootstrap a compiler when artifacts buildcache is turned on

spack.test.cmd.ci.test_ci_generate_bootstrap_gcc(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env)[source]

Test that we can bootstrap a compiler and use it as the compiler for a spec in the environment

spack.test.cmd.ci.test_ci_generate_bootstrap_prune_dag(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch, tmpdir, mutable_mock_env_path, project_dir_env)[source]

Test compiler bootstrapping with DAG pruning. Specifically, make sure that if we detect the bootstrapped compiler needs to be rebuilt, we ensure the spec we want to build with that compiler is scheduled for rebuild as well.

spack.test.cmd.ci.test_ci_generate_for_pr_pipeline(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env)[source]

Test that PR pipelines do not include a final stage job for rebuilding the mirror index, even if that job is specifically configured

spack.test.cmd.ci.test_ci_generate_override_runner_attrs(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env)[source]

Test that we get the behavior we want with respect to the provision of runner attributes like tags, variables, and scripts, both when we inherit them from the top level, as well as when we override one or more at the runner level

spack.test.cmd.ci.test_ci_generate_pkg_with_deps(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env)[source]

Test pipeline generation for a package w/ dependencies

spack.test.cmd.ci.test_ci_generate_read_broken_specs_url(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env)[source]

Verify that broken-specs-url works as intended

spack.test.cmd.ci.test_ci_generate_temp_storage_url(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env, mock_binary_index)[source]

Verify correct behavior when using temporary-storage-url-prefix

spack.test.cmd.ci.test_ci_generate_with_cdash_token(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env, mock_binary_index)[source]

Make sure we it doesn’t break if we configure cdash

spack.test.cmd.ci.test_ci_generate_with_custom_scripts(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env, mock_binary_index)[source]

Test use of user-provided scripts

spack.test.cmd.ci.test_ci_generate_with_env(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env, mock_binary_index)[source]

Make sure we can get a .gitlab-ci.yml from an environment file which has the gitlab-ci, cdash, and mirrors sections.

spack.test.cmd.ci.test_ci_generate_with_env_missing_section(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, project_dir_env, mock_binary_index)[source]

Make sure we get a reasonable message if we omit gitlab-ci section

spack.test.cmd.ci.test_ci_generate_with_external_pkg(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env)[source]

Make sure we do not generate jobs for external pkgs

spack.test.cmd.ci.test_ci_generate_with_workarounds(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, project_dir_env)[source]

Make sure the post-processing cli workarounds do what they should

spack.test.cmd.ci.test_ci_nothing_to_rebuild(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, mock_fetch, project_dir_env, mock_binary_index)[source]
spack.test.cmd.ci.test_ci_rebuild(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, mock_gnupghome, mock_fetch, project_dir_env, mock_binary_index)[source]
spack.test.cmd.ci.test_ci_rebuild_index(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, mock_fetch, mock_stage)[source]
spack.test.cmd.ci.test_ci_reproduce(tmpdir, mutable_mock_env_path, install_mockery, mock_packages, monkeypatch, last_two_git_commits, project_dir_env, mock_binary_index)[source]
spack.test.cmd.ci.test_ci_subcommands_without_mirror(tmpdir, mutable_mock_env_path, mock_packages, install_mockery, project_dir_env, mock_binary_index)[source]

Make sure we catch if there is not a mirror and report an error

spack.test.cmd.ci.test_ensure_only_one_temporary_storage()[source]

Make sure ‘gitlab-ci’ section of env does not allow specification of both ‘enable-artifacts-buildcache’ and ‘temporary-storage-url-prefix’.

spack.test.cmd.ci.test_push_mirror_contents(tmpdir, mutable_mock_env_path, install_mockery_mutable_config, mock_packages, mock_fetch, mock_stage, mock_gnupghome, project_dir_env)[source]
spack.test.cmd.ci.test_push_mirror_contents_exceptions(monkeypatch, capsys)[source]
spack.test.cmd.ci.test_specs_staging(config)[source]

Make sure we achieve the best possible staging for the following spec DAG:

  a
 /|
c b
  |        e d
    |          f g

In this case, we would expect ‘c’, ‘e’, ‘f’, and ‘g’ to be in the first stage, and then ‘d’, ‘b’, and ‘a’ to be put in the next three stages, respectively.

spack.test.cmd.clean module

spack.test.cmd.clean.mock_calls_for_clean(monkeypatch)[source]
spack.test.cmd.clean.test_function_calls(command_line, effects, mock_calls_for_clean)[source]

spack.test.cmd.commands module

spack.test.cmd.commands.test_bash_completion()[source]

Test the bash completion writer.

spack.test.cmd.commands.test_names()[source]

Test default output of spack commands.

spack.test.cmd.commands.test_no_pipe_error()[source]

Make sure we don’t see any pipe errors when piping output.

spack.test.cmd.commands.test_rst()[source]

Do some simple sanity checks of the rst writer.

spack.test.cmd.commands.test_rst_update(tmpdir)[source]
spack.test.cmd.commands.test_rst_with_header(tmpdir)[source]
spack.test.cmd.commands.test_rst_with_input_files(tmpdir)[source]
spack.test.cmd.commands.test_subcommands()[source]

Test subcommand traversal.

spack.test.cmd.commands.test_update_completion_arg(tmpdir, monkeypatch)[source]
spack.test.cmd.commands.test_update_with_header(tmpdir)[source]
spack.test.cmd.commands.test_updated_completion_scripts(tmpdir)[source]

Make sure our shell tab completion scripts remain up-to-date.

spack.test.cmd.compiler module

spack.test.cmd.compiler.clangdir(tmpdir)[source]

Create a directory with some dummy compiler scripts in it.

Scripts are:
  • clang

  • clang++

  • gcc

  • g++

  • gfortran-8

spack.test.cmd.compiler.mock_compiler_dir(tmpdir, mock_compiler_version)[source]

Return a directory containing a fake, but detectable compiler.

spack.test.cmd.compiler.mock_compiler_version()[source]
spack.test.cmd.compiler.test_compiler_add(mutable_config, mock_packages, mock_compiler_dir, mock_compiler_version)[source]
spack.test.cmd.compiler.test_compiler_find_mixed_suffixes(no_compilers_yaml, working_env, clangdir)[source]

Ensure that we’ll mix compilers with different suffixes when necessary.

spack.test.cmd.compiler.test_compiler_find_no_apple_gcc(no_compilers_yaml, working_env, tmpdir)[source]
spack.test.cmd.compiler.test_compiler_find_path_order(no_compilers_yaml, working_env, clangdir)[source]

Ensure that we find compilers that come first in the PATH first

spack.test.cmd.compiler.test_compiler_find_prefer_no_suffix(no_compilers_yaml, working_env, clangdir)[source]

Ensure that we’ll pick ‘clang’ over ‘clang-gpu’ when there is a choice.

spack.test.cmd.compiler.test_compiler_find_without_paths(no_compilers_yaml, working_env, tmpdir)[source]
spack.test.cmd.compiler.test_compiler_remove(mutable_config, mock_packages)[source]

spack.test.cmd.concretize module

spack.test.cmd.concretize.test_concretize_all_test_dependencies(concretization)[source]

Check all test dependencies are concretized.

spack.test.cmd.concretize.test_concretize_root_test_dependencies_are_concretized(concretization)[source]

Check that root test dependencies are concretized.

spack.test.cmd.concretize.test_concretize_root_test_dependencies_not_recursive(concretization)[source]

Check that test dependencies are not concretized recursively.

spack.test.cmd.config module

spack.test.cmd.config.check_config_updated(data)[source]
spack.test.cmd.config.check_packages_updated(data)[source]

Check that the data from the packages_yaml_v015 has been updated.

spack.test.cmd.config.config_yaml_v015(mutable_config)[source]

Create a packages.yaml in the old format

spack.test.cmd.config.packages_yaml_v015(mutable_config)[source]

Create a packages.yaml in the old format

spack.test.cmd.config.test_config_add(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_from_file(mutable_empty_config, tmpdir)[source]
spack.test.cmd.config.test_config_add_from_file_multiple(mutable_empty_config, tmpdir)[source]
spack.test.cmd.config.test_config_add_invalid_fails(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_invalid_file_fails(tmpdir)[source]
spack.test.cmd.config.test_config_add_list(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_ordered_dict(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_override(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_override_from_file(mutable_empty_config, tmpdir)[source]
spack.test.cmd.config.test_config_add_override_leaf(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_override_leaf_from_file(mutable_empty_config, tmpdir)[source]
spack.test.cmd.config.test_config_add_to_env(mutable_empty_config, mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_add_to_env_preserve_comments(mutable_empty_config, mutable_mock_env_path, tmpdir)[source]
spack.test.cmd.config.test_config_add_update_dict(mutable_empty_config)[source]
spack.test.cmd.config.test_config_add_update_dict_from_file(mutable_empty_config, tmpdir)[source]
spack.test.cmd.config.test_config_edit()[source]

Ensure spack config edit edits the right paths.

spack.test.cmd.config.test_config_edit_edits_spack_yaml(mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_edit_fails_correctly_with_no_env(mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_get_fails_correctly_with_no_env(mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_get_gets_spack_yaml(mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_list()[source]
spack.test.cmd.config.test_config_prefer_upstream(tmpdir_factory, install_mockery, mock_fetch, mutable_config, gen_mock_layout, monkeypatch)[source]

Check that when a dependency package is recorded as installed in an upstream database that it is not reinstalled.

spack.test.cmd.config.test_config_remove_alias_rm(mutable_empty_config)[source]
spack.test.cmd.config.test_config_remove_dict(mutable_empty_config)[source]
spack.test.cmd.config.test_config_remove_from_env(mutable_empty_config, mutable_mock_env_path)[source]
spack.test.cmd.config.test_config_remove_value(mutable_empty_config)[source]
spack.test.cmd.config.test_config_revert(packages_yaml_v015)[source]
spack.test.cmd.config.test_config_revert_raise_if_cant_write(packages_yaml_v015, monkeypatch)[source]
spack.test.cmd.config.test_config_update_can_handle_comments(mutable_config)[source]
spack.test.cmd.config.test_config_update_config(config_yaml_v015)[source]
spack.test.cmd.config.test_config_update_fail_on_permission_issue(packages_yaml_v015, monkeypatch)[source]
spack.test.cmd.config.test_config_update_not_needed(mutable_config)[source]
spack.test.cmd.config.test_config_update_packages(packages_yaml_v015)[source]

Test Spack updating old packages.yaml format for externals to new format. Ensure that data is preserved and converted properly.

spack.test.cmd.config.test_config_update_works_for_empty_paths(mutable_config)[source]
spack.test.cmd.config.test_config_with_c_argument(mutable_empty_config)[source]
spack.test.cmd.config.test_get_config_scope(mock_low_high_config)[source]
spack.test.cmd.config.test_get_config_scope_merged(mock_low_high_config)[source]
spack.test.cmd.config.test_remove_from_list(mutable_empty_config)[source]
spack.test.cmd.config.test_remove_list(mutable_empty_config)[source]
spack.test.cmd.config.test_updating_config_implicitly_raises(packages_yaml_v015)[source]
spack.test.cmd.config.test_updating_multiple_scopes_at_once(packages_yaml_v015)[source]

spack.test.cmd.create module

spack.test.cmd.create.parser()[source]

Returns the parser for the module

spack.test.cmd.create.test_build_system_guesser_no_stage(parser)[source]

Test build system guesser when stage not provided.

spack.test.cmd.create.test_build_system_guesser_octave(parser)[source]

Test build system guesser for the special case, where the same base URL identifies the build system rather than guessing the build system from files contained in the archive.

spack.test.cmd.create.test_create_template(parser, mock_test_repo, args, name, expected)[source]

Test template creation.

spack.test.cmd.create.test_create_template_bad_name(parser, mock_test_repo, name, expected, capsys)[source]

Test template creation with bad name options.

spack.test.cmd.create.test_get_name_error(parser, monkeypatch, capsys)[source]

Test get_name UndetectableNameError exception path.

spack.test.cmd.create.test_get_name_urls(parser, url, expected)[source]

Test get_name with different URLs.

spack.test.cmd.debug module

spack.test.cmd.debug.test_create_db_tarball(tmpdir, database)[source]
spack.test.cmd.debug.test_report()[source]

spack.test.cmd.dependencies module

spack.test.cmd.dependencies.test_direct_dependencies(mock_packages)[source]
spack.test.cmd.dependencies.test_direct_installed_dependencies(mock_packages, database)[source]
spack.test.cmd.dependencies.test_transitive_dependencies(mock_packages)[source]
spack.test.cmd.dependencies.test_transitive_dependencies_with_deptypes(mock_packages)[source]
spack.test.cmd.dependencies.test_transitive_installed_dependencies(mock_packages, database)[source]

spack.test.cmd.dependents module

spack.test.cmd.dependents.test_immediate_dependents(mock_packages)[source]
spack.test.cmd.dependents.test_immediate_installed_dependents(mock_packages, database)[source]
spack.test.cmd.dependents.test_transitive_dependents(mock_packages)[source]
spack.test.cmd.dependents.test_transitive_installed_dependents(mock_packages, database)[source]

spack.test.cmd.deprecate module

spack.test.cmd.deprecate.test_concretize_deprecated(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that the concretizer throws an error if we concretize to a deprecated spec

spack.test.cmd.deprecate.test_deprecate(mock_packages, mock_archive, mock_fetch, install_mockery)[source]
spack.test.cmd.deprecate.test_deprecate_already_deprecated(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that we can re-deprecate a spec to change its deprecator.

spack.test.cmd.deprecate.test_deprecate_deprecator(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that when a deprecator spec is deprecated, its deprecatee specs are updated to point to the new deprecator.

spack.test.cmd.deprecate.test_deprecate_deps(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Test that the deprecate command deprecates all dependencies properly.

spack.test.cmd.deprecate.test_deprecate_fails_active_extensions(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that active extensions and their extendees cannot be deprecated.

spack.test.cmd.deprecate.test_deprecate_fails_no_such_package(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that deprecating a spec that is not installed fails.

Tests that deprecating without the -i option in favor of a spec that is not installed fails.

spack.test.cmd.deprecate.test_deprecate_install(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that the `-i option allows us to deprecate in favor of a spec that is not yet installed.

spack.test.cmd.deprecate.test_uninstall_deprecated(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

Tests that we can still uninstall deprecated packages.

spack.test.cmd.dev_build module

spack.test.cmd.dev_build.mock_module_noop(*args)[source]
spack.test.cmd.dev_build.print_spack_cc(*args)[source]
spack.test.cmd.dev_build.test_dev_build_basics(tmpdir, mock_packages, install_mockery)[source]
spack.test.cmd.dev_build.test_dev_build_before(tmpdir, mock_packages, install_mockery)[source]
spack.test.cmd.dev_build.test_dev_build_before_until(tmpdir, mock_packages, install_mockery, capsys)[source]
spack.test.cmd.dev_build.test_dev_build_drop_in(tmpdir, mock_packages, monkeypatch, install_mockery)[source]
spack.test.cmd.dev_build.test_dev_build_env(tmpdir, mock_packages, install_mockery, mutable_mock_env_path)[source]

Test Spack does dev builds for packages in develop section of env.

spack.test.cmd.dev_build.test_dev_build_env_dependency(tmpdir, mock_packages, install_mockery, mock_fetch, mutable_mock_env_path)[source]

Test non-root specs in an environment are properly marked for dev builds.

spack.test.cmd.dev_build.test_dev_build_env_version_mismatch(tmpdir, mock_packages, install_mockery, mutable_mock_env_path)[source]

Test Spack constraints concretization by develop specs.

spack.test.cmd.dev_build.test_dev_build_fails_already_installed(tmpdir, mock_packages, install_mockery)[source]
spack.test.cmd.dev_build.test_dev_build_fails_multiple_specs(mock_packages)[source]
spack.test.cmd.dev_build.test_dev_build_fails_no_spec()[source]
spack.test.cmd.dev_build.test_dev_build_fails_no_version(mock_packages)[source]
spack.test.cmd.dev_build.test_dev_build_fails_nonexistent_package_name(mock_packages)[source]
spack.test.cmd.dev_build.test_dev_build_multiple(tmpdir, mock_packages, install_mockery, mutable_mock_env_path, mock_fetch)[source]

Test spack install with multiple developer builds

spack.test.cmd.dev_build.test_dev_build_rebuild_on_source_changes(test_spec, tmpdir, mock_packages, install_mockery, mutable_mock_env_path, mock_fetch)[source]

Test dev builds rebuild on changes to source code.

test_spec = dev-build-test-install tests rebuild for changes to package test_spec = dependent-of-dev-build tests rebuild for changes to dep

spack.test.cmd.dev_build.test_dev_build_until(tmpdir, mock_packages, install_mockery)[source]
spack.test.cmd.dev_build.test_dev_build_until_last_phase(tmpdir, mock_packages, install_mockery)[source]

spack.test.cmd.develop module

class spack.test.cmd.develop.TestDevelop[source]

Bases: object

check_develop(env, spec, path=None)[source]
pytestmark = [Mark(name='usefixtures', args=('mutable_mock_env_path', 'mock_packages', 'mock_fetch'), kwargs={})]
test_develop()[source]
test_develop_no_args()[source]
test_develop_no_clone(tmpdir)[source]
test_develop_no_path_no_clone()[source]
test_develop_twice()[source]
test_develop_update_path(tmpdir)[source]
test_develop_update_spec()[source]

spack.test.cmd.diff module

spack.test.cmd.diff.test_diff_cmd(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test that we can install two packages and diff them

spack.test.cmd.diff.test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test with and without the –first option

spack.test.cmd.env module

spack.test.cmd.env.check_mpileaks_and_deps_in_view(viewdir)[source]

Check that the expected install directories exist.

spack.test.cmd.env.check_viewdir_removal(viewdir)[source]

Check that the uninstall/removal worked.

spack.test.cmd.env.create_v1_lockfile_dict(roots, all_specs)[source]
spack.test.cmd.env.packages_yaml_v015(tmpdir)[source]

Return the path to an existing manifest in the v0.15.x format and the path to a non yet existing backup file.

spack.test.cmd.env.test_activate_adds_transitive_run_deps_to_path(install_mockery, mock_fetch, monkeypatch)[source]
spack.test.cmd.env.test_activate_temp(monkeypatch, tmpdir)[source]

Tests whether spack env activate –temp creates an environment in a temporary directory

spack.test.cmd.env.test_activation_and_deactiviation_ambiguities(method, env, no_env, env_dir, capsys)[source]

spack [-e x | -E | -D x/] env [activate | deactivate] y are ambiguous

spack.test.cmd.env.test_add()[source]
spack.test.cmd.env.test_bad_env_yaml_format(tmpdir)[source]
spack.test.cmd.env.test_can_update_attributes_with_override(tmpdir)[source]
spack.test.cmd.env.test_cant_install_single_spec_when_concretizing_together()[source]
spack.test.cmd.env.test_concretize()[source]
spack.test.cmd.env.test_concretize_user_specs_together()[source]
spack.test.cmd.env.test_custom_store_in_environment(mutable_config, tmpdir)[source]
spack.test.cmd.env.test_custom_version_concretize_together(tmpdir)[source]
spack.test.cmd.env.test_does_not_rewrite_rel_dev_path_when_keep_relative_is_set(tmpdir)[source]

Relative develop paths should not be rewritten when –keep-relative is passed to create

spack.test.cmd.env.test_double_update(packages_yaml_v015)[source]
spack.test.cmd.env.test_duplicate_packages_raise_when_concretizing_together()[source]
spack.test.cmd.env.test_env_activate_broken_view(mutable_mock_env_path, mock_archive, mock_fetch, mock_packages, install_mockery)[source]
spack.test.cmd.env.test_env_activate_csh_prints_shell_output(tmpdir, mock_stage, mock_fetch, install_mockery)[source]

Check the shell commands output by spack env activate --csh.

spack.test.cmd.env.test_env_activate_default_view_root_unconditional(mutable_mock_env_path)[source]

Check that the root of the default view in the environment is added to the shell unconditionally.

spack.test.cmd.env.test_env_activate_sh_prints_shell_output(tmpdir, mock_stage, mock_fetch, install_mockery)[source]

Check the shell commands output by spack env activate --sh.

This is a cursory check; share/spack/qa/setup-env-test.sh checks for correctness.

spack.test.cmd.env.test_env_activate_view_fails(tmpdir, mock_stage, mock_fetch, install_mockery)[source]

Sanity check on env activate to make sure it requires shell support

spack.test.cmd.env.test_env_add_nonexistant_fails()[source]
spack.test.cmd.env.test_env_add_virtual()[source]
spack.test.cmd.env.test_env_blocks_uninstall(mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_commands_die_with_no_env_arg()[source]
spack.test.cmd.env.test_env_config_precedence()[source]
spack.test.cmd.env.test_env_config_view_default(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_install_all(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_install_same_spec_twice(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_install_single_spec(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_install_two_specs_same_dep(install_mockery, mock_fetch, tmpdir, capsys)[source]

Test installation of two packages that share a dependency with no connection and the second specifying the dependency as a ‘build’ dependency.

spack.test.cmd.env.test_env_list(mutable_mock_env_path)[source]
spack.test.cmd.env.test_env_loads(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_modifications_error_on_activate(install_mockery, mock_fetch, monkeypatch, capfd)[source]
spack.test.cmd.env.test_env_remove(capfd)[source]
spack.test.cmd.env.test_env_repo()[source]
spack.test.cmd.env.test_env_roots_marked_explicit(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_status_broken_view(mutable_mock_env_path, mock_archive, mock_fetch, mock_packages, install_mockery)[source]
spack.test.cmd.env.test_env_uninstalled_specs(install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_env_updates_view_add_concretize(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_force_remove(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_install(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_install_package(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_remove_concretize(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_uninstall(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_updates_view_uninstall_referenced_elsewhere(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_view_external_prefix(tmpdir_factory, mutable_database, mock_packages)[source]
spack.test.cmd.env.test_env_view_fails(tmpdir, mock_packages, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_with_config()[source]
spack.test.cmd.env.test_env_with_include_config_files_same_basename()[source]
spack.test.cmd.env.test_env_with_included_config_file()[source]
spack.test.cmd.env.test_env_with_included_config_scope()[source]
spack.test.cmd.env.test_env_with_included_config_var_path()[source]
spack.test.cmd.env.test_env_without_view_install(tmpdir, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_env_write_only_non_default()[source]
spack.test.cmd.env.test_env_write_only_non_default_nested(tmpdir)[source]
spack.test.cmd.env.test_environment_status(capsys, tmpdir)[source]
spack.test.cmd.env.test_included_config_precedence()[source]
spack.test.cmd.env.test_indirect_build_dep()[source]

Simple case of X->Y->Z where Y is a build/link dep and Z is a build-only dep. Make sure this concrete DAG is preserved when writing the environment out and reading it back.

spack.test.cmd.env.test_init_from_lockfile(tmpdir)[source]

Test that an environment can be instantiated from a lockfile.

spack.test.cmd.env.test_init_from_yaml(tmpdir)[source]

Test that an environment can be instantiated from a lockfile.

spack.test.cmd.env.test_init_with_file_and_remove(tmpdir)[source]

Ensure a user can remove from any position in the spack.yaml file.

spack.test.cmd.env.test_lockfile_not_deleted_on_write_error(tmpdir, monkeypatch)[source]
spack.test.cmd.env.test_modules_relative_to_views(tmpdir, install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_multiple_modules_post_env_hook(tmpdir, install_mockery, mock_fetch)[source]
spack.test.cmd.env.test_newline_in_commented_sequence_is_not_an_issue(tmpdir)[source]
spack.test.cmd.env.test_old_format_cant_be_updated_implicitly(packages_yaml_v015)[source]
spack.test.cmd.env.test_query_develop_specs()[source]

Test whether a spec is develop’ed or not

spack.test.cmd.env.test_read_old_lock_and_write_new(tmpdir)[source]
spack.test.cmd.env.test_read_old_lock_creates_backup(tmpdir)[source]

When reading a version-1 lockfile, make sure that a backup of that file is created.

spack.test.cmd.env.test_remove_after_concretize()[source]
spack.test.cmd.env.test_remove_command()[source]
spack.test.cmd.env.test_rewrite_rel_dev_path_create_original_dir(tmpdir)[source]

Relative develop paths should not be rewritten when creating an environment in the original directory

spack.test.cmd.env.test_rewrite_rel_dev_path_named_env(tmpdir)[source]

Relative develop paths should by default be rewritten for new named environment

spack.test.cmd.env.test_rewrite_rel_dev_path_new_dir(tmpdir)[source]

Relative develop paths should be rewritten for new environments in a different directory from the original manifest file

spack.test.cmd.env.test_rewrite_rel_dev_path_original_dir(tmpdir)[source]

Relative devevelop paths should not be rewritten when initializing an environment with root path set to the same directory

spack.test.cmd.env.test_roots_display_with_variants()[source]
spack.test.cmd.env.test_stack_combinatorial_view(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_concretize_extraneous_deps(tmpdir, config, mock_packages)[source]
spack.test.cmd.env.test_stack_concretize_extraneous_variants(tmpdir, config, mock_packages)[source]
spack.test.cmd.env.test_stack_concretize_extraneous_variants_with_dash(tmpdir, config, mock_packages)[source]
spack.test.cmd.env.test_stack_definition_complex_conditional(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_add_write(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_false(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_invalid_variable(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_true(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_with_satisfaction(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_conditional_with_variable(tmpdir)[source]
spack.test.cmd.env.test_stack_definition_extension(tmpdir)[source]
spack.test.cmd.env.test_stack_view_activate_from_default(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_view_exclude(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_view_multiple_views(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_view_no_activate_without_default(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_view_select(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_view_select_and_exclude(tmpdir, mock_fetch, mock_packages, mock_archive, install_mockery)[source]
spack.test.cmd.env.test_stack_yaml_add_to_list(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_definitions(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_definitions_as_constraints(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_definitions_as_constraints_on_matrix(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_definitions_write_reference(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_force_remove_from_matrix(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_remove_from_list(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_remove_from_list_force(tmpdir)[source]
spack.test.cmd.env.test_stack_yaml_remove_from_matrix_no_effect(tmpdir)[source]
spack.test.cmd.env.test_stage(mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_store_different_build_deps()[source]

Ensure that an environment can store two instances of a build-only dependency:

      x       y
     /| (l)   | (b)
(b) | y       z2
     \| (b)
      z1
spack.test.cmd.env.test_to_lockfile_dict()[source]
spack.test.cmd.env.test_uninstall_removes_from_env(mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.env.test_update_and_revert(packages_yaml_v015)[source]
spack.test.cmd.env.test_update_anonymous_env(packages_yaml_v015)[source]
spack.test.cmd.env.test_user_removed_spec()[source]

Ensure a user can remove from any position in the spack.yaml file.

spack.test.cmd.env.test_virtual_spec_concretize_together(tmpdir)[source]
spack.test.cmd.env.test_with_config_bad_include(capfd)[source]

spack.test.cmd.extensions module

spack.test.cmd.extensions.python_database(mock_packages, mutable_database)[source]
spack.test.cmd.extensions.test_extensions(mock_packages, python_database, config, capsys)[source]
spack.test.cmd.extensions.test_extensions_no_arguments(mock_packages)[source]
spack.test.cmd.extensions.test_extensions_raises_if_multiple_specs(mock_packages)[source]
spack.test.cmd.extensions.test_extensions_raises_if_not_extendable(mock_packages)[source]

spack.test.cmd.external module

spack.test.cmd.external.executables_found(monkeypatch)[source]
spack.test.cmd.external.test_find_external_cmd(mutable_config, working_env, mock_executable)[source]

Test invoking ‘spack external find’ with additional package arguments, which restricts the set of packages that Spack looks for.

spack.test.cmd.external.test_find_external_cmd_full_repo(mutable_config, working_env, mock_executable, mutable_mock_repo)[source]

Test invoking ‘spack external find’ with no additional arguments, which iterates through each package in the repository.

spack.test.cmd.external.test_find_external_cmd_not_buildable(mutable_config, working_env, mock_executable)[source]

When the user invokes ‘spack external find –not-buildable’, the config for any package where Spack finds an external version should be marked as not buildable.

spack.test.cmd.external.test_find_external_merge(mutable_config, mutable_mock_repo)[source]

Check that ‘spack find external’ doesn’t overwrite an existing spec entry in packages.yaml.

spack.test.cmd.external.test_find_external_single_package(mock_executable, executables_found)[source]
spack.test.cmd.external.test_find_external_two_instances_same_package(mock_executable, executables_found)[source]
spack.test.cmd.external.test_find_external_update_config(mutable_config)[source]
spack.test.cmd.external.test_get_executables(working_env, mock_executable)[source]
spack.test.cmd.external.test_list_detectable_packages(mutable_config, mutable_mock_repo)[source]
spack.test.cmd.external.test_new_entries_are_reported_correctly(mock_executable, mutable_config, monkeypatch)[source]
spack.test.cmd.external.test_overriding_prefix(mock_executable, mutable_config, monkeypatch)[source]
spack.test.cmd.external.test_packages_yaml_format(mock_executable, mutable_config, monkeypatch)[source]
spack.test.cmd.external.test_use_tags_for_detection(command_args, mock_executable, mutable_config, monkeypatch)[source]

spack.test.cmd.fetch module

spack.test.cmd.fetch.test_fetch_in_env(tmpdir, mock_archive, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.fetch.test_fetch_multiple_specs(tmpdir, mock_archive, mock_stage, mock_fetch, install_mockery)[source]
spack.test.cmd.fetch.test_fetch_no_argument()[source]
spack.test.cmd.fetch.test_fetch_single_spec(tmpdir, mock_archive, mock_stage, mock_fetch, install_mockery)[source]

spack.test.cmd.find module

spack.test.cmd.find.mock_display(monkeypatch, specs)[source]

Monkeypatches the display function to return its first argument

spack.test.cmd.find.parser()[source]

Returns the parser for the module command

spack.test.cmd.find.specs()[source]
spack.test.cmd.find.test_display_json(database, capsys)[source]
spack.test.cmd.find.test_display_json_deps(database, capsys)[source]
spack.test.cmd.find.test_find_command_basic_usage(database)[source]
spack.test.cmd.find.test_find_format(database, config)[source]
spack.test.cmd.find.test_find_format_deps(database, config)[source]
spack.test.cmd.find.test_find_format_deps_paths(database, config)[source]
spack.test.cmd.find.test_find_json(database)[source]
spack.test.cmd.find.test_find_json_deps(database)[source]
spack.test.cmd.find.test_find_loaded(database, working_env)[source]
spack.test.cmd.find.test_find_no_sections(database, config)[source]
spack.test.cmd.find.test_find_not_found(database, config, capsys)[source]
spack.test.cmd.find.test_find_prefix_in_env(mutable_mock_env_path, install_mockery, mock_fetch, mock_packages, mock_archive, config)[source]

Test find formats requiring concrete specs work in environments.

spack.test.cmd.find.test_find_show_compiler(database, config)[source]
spack.test.cmd.find.test_find_very_long(database, config)[source]
spack.test.cmd.find.test_namespaces_shown_correctly(database)[source]
spack.test.cmd.find.test_query_arguments()[source]
spack.test.cmd.find.test_tag1(parser, specs)[source]
spack.test.cmd.find.test_tag2(parser, specs)[source]
spack.test.cmd.find.test_tag2_tag3(parser, specs)[source]

spack.test.cmd.gc module

spack.test.cmd.gc.test_gc_with_environment(config, mutable_database, mutable_mock_env_path, capsys)[source]
spack.test.cmd.gc.test_no_packages_to_remove(config, mutable_database, capsys)[source]
spack.test.cmd.gc.test_packages_are_removed(config, mutable_database, capsys)[source]

spack.test.cmd.gpg module

spack.test.cmd.gpg.gpg = <spack.main.SpackCommand object>

spack command used by tests below

spack.test.cmd.gpg.test_find_gpg(cmd_name, version, tmpdir, mock_gnupghome, monkeypatch)[source]
spack.test.cmd.gpg.test_gpg(tmpdir, mock_gnupghome)[source]
spack.test.cmd.gpg.test_no_gpg_in_path(tmpdir, mock_gnupghome, monkeypatch, mutable_config)[source]

spack.test.cmd.graph module

spack.test.cmd.graph.test_graph_ascii()[source]

Tests spack graph –ascii

spack.test.cmd.graph.test_graph_deptype()[source]

Tests spack graph –deptype

spack.test.cmd.graph.test_graph_dot()[source]

Tests spack graph –dot

spack.test.cmd.graph.test_graph_installed()[source]

Tests spack graph –installed

spack.test.cmd.graph.test_graph_no_specs()[source]

Tests spack graph with no arguments

spack.test.cmd.graph.test_graph_static()[source]

Tests spack graph –static

spack.test.cmd.help module

spack.test.cmd.help.test_help()[source]

Sanity check the help command to make sure it works.

spack.test.cmd.help.test_help_all()[source]

Test the spack help –all flag

spack.test.cmd.help.test_help_spec()[source]

Test the spack help –spec flag

spack.test.cmd.help.test_help_subcommand()[source]

Test the spack help subcommand argument

spack.test.cmd.help.test_reuse_after_help()[source]

Test spack help can be called twice with the same SpackCommand.

spack.test.cmd.info module

spack.test.cmd.info.info_lines()[source]
spack.test.cmd.info.mock_print(monkeypatch, info_lines)[source]
spack.test.cmd.info.parser()[source]

Returns the parser for the module command

spack.test.cmd.info.test_info_fields(pkg_query, parser, info_lines)[source]
spack.test.cmd.info.test_info_noversion(mock_packages, info_lines, mock_print)[source]

Check that a mock package with no versions or variants outputs None.

spack.test.cmd.info.test_is_externally_detectable(pkg_query, expected, parser, info_lines)[source]
spack.test.cmd.info.test_it_just_runs(pkg)[source]

spack.test.cmd.init_py_functions module

spack.test.cmd.init_py_functions.test_require_cmd_name()[source]

By convention, Spack command names should contain dashes rather than underscores—ensure that require_cmd_name() raises the appropriate exception if underscores are detected.

spack.test.cmd.init_py_functions.test_require_python_name()[source]

Python module names should not contain dashes—ensure that require_python_name() raises the appropriate exception if one is detected.

spack.test.cmd.install module

spack.test.cmd.install.fake_full_hash(spec)[source]
spack.test.cmd.install.noop_install(monkeypatch)[source]
spack.test.cmd.install.test_build_error_output(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_build_warning_output(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cache_install_full_hash_match(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch, tmpdir)[source]

Make sure installing from cache respects full hash argument

spack.test.cmd.install.test_cache_only_fails(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_auth_token(tmpdir, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_buildstamp_param(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_configure_warning(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_install_from_spec_yaml(tmpdir, mock_fetch, install_mockery, capfd, mock_packages, mock_archive, config)[source]
spack.test.cmd.install.test_cdash_report_concretization_error(tmpdir, mock_fetch, install_mockery, capfd, conflict_spec)[source]
spack.test.cmd.install.test_cdash_upload_build_error(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_upload_clean_build(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_cdash_upload_extra_params(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_compiler_bootstrap(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch)[source]
spack.test.cmd.install.test_compiler_bootstrap_already_installed(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch)[source]
spack.test.cmd.install.test_compiler_bootstrap_from_binary_mirror(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch, tmpdir)[source]

Make sure installing compiler from buildcache registers compiler

spack.test.cmd.install.test_extra_files_are_archived(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_commit(mock_git_version_info, install_mockery, mock_packages, monkeypatch)[source]

Test installing a git package from a commit.

This ensures Spack appropriately associates commit versions with their packages in time to do version lookups. Details of version lookup tested elsewhere

spack.test.cmd.install.test_install_conflicts(conflict_spec)[source]
spack.test.cmd.install.test_install_deps_then_package(tmpdir, mock_fetch, install_mockery)[source]
spack.test.cmd.install.test_install_dirty_flag(arguments, expected)[source]
spack.test.cmd.install.test_install_env_variables(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_env_with_tests_all(tmpdir, mock_packages, mock_fetch, install_mockery, mutable_mock_env_path)[source]
spack.test.cmd.install.test_install_env_with_tests_root(tmpdir, mock_packages, mock_fetch, install_mockery, mutable_mock_env_path)[source]
spack.test.cmd.install.test_install_fails_no_args(tmpdir)[source]
spack.test.cmd.install.test_install_fails_no_args_suggests_env_activation(tmpdir)[source]
spack.test.cmd.install.test_install_from_file(spec, concretize, error_code, tmpdir)[source]
spack.test.cmd.install.test_install_help_cdash(capsys)[source]

Make sure spack install –help-cdash describes CDash arguments

spack.test.cmd.install.test_install_help_does_not_show_cdash_options(capsys)[source]

Make sure spack install –help does not describe CDash arguments

spack.test.cmd.install.test_install_invalid_spec(invalid_spec)[source]
spack.test.cmd.install.test_install_mix_cli_and_files(clispecs, filespecs, tmpdir)[source]
spack.test.cmd.install.test_install_no_add_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock_env_path)[source]
spack.test.cmd.install.test_install_only_dependencies(tmpdir, mock_fetch, install_mockery)[source]
spack.test.cmd.install.test_install_only_dependencies_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock_env_path)[source]
spack.test.cmd.install.test_install_only_dependencies_of_all_in_env(tmpdir, mock_fetch, install_mockery, mutable_mock_env_path)[source]
spack.test.cmd.install.test_install_only_package(tmpdir, mock_fetch, install_mockery, capfd)[source]
spack.test.cmd.install.test_install_output_on_build_error(mock_packages, mock_archive, mock_fetch, config, install_mockery, capfd)[source]

This test used to assume receiving full output, but since we’ve updated spack to generate logs on the level of phases, it will only return the last phase, install.

spack.test.cmd.install.test_install_output_on_python_error(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_overwrite(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_overwrite_multiple(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_overwrite_not_installed(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_package_already_installed(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_package_and_dependency(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.install.test_install_runtests_all(monkeypatch, mock_packages, install_mockery)[source]
spack.test.cmd.install.test_install_runtests_notests(monkeypatch, mock_packages, install_mockery)[source]
spack.test.cmd.install.test_install_runtests_root(monkeypatch, mock_packages, install_mockery)[source]
spack.test.cmd.install.test_install_with_source(mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]

Verify that source has been copied into place.

spack.test.cmd.install.test_junit_output_with_errors(exc_typename, msg, mock_packages, mock_archive, mock_fetch, install_mockery, config, tmpdir, monkeypatch)[source]
spack.test.cmd.install.test_junit_output_with_failures(tmpdir, exc_typename, msg)[source]
spack.test.cmd.install.test_package_output(tmpdir, capsys, install_mockery, mock_fetch)[source]

Ensure output printed from pkgs is captured by output redirection.

spack.test.cmd.install.test_show_log_on_error(mock_packages, mock_archive, mock_fetch, config, install_mockery, capfd)[source]

Make sure –show-log-on-error works.

spack.test.cmd.is_git_repo module

spack.test.cmd.is_git_repo.check_git_version()[source]

Check if git version is new enough for worktree functionality. Return True if requirements are met.

The latest required functionality is worktree remove which was only added in 2.17.0.

Refer: https://github.com/git/git/commit/cc73385cf6c5c229458775bc92e7dbbe24d11611

spack.test.cmd.is_git_repo.git_tmp_worktree(tmpdir)[source]

Create new worktree in a temporary folder and monkeypatch spack.paths.prefix to point to it.

spack.test.cmd.is_git_repo.test_is_git_repo_in_worktree(git_tmp_worktree)[source]

Verify that spack.cmd.spack_is_git_repo() can identify a git repository in a worktree.

spack.test.cmd.is_git_repo.test_spack_is_git_repo_nongit(tmpdir, monkeypatch)[source]

Verify that spack.cmd.spack_is_git_repo() correctly returns False if we are in a non-git directory.

spack.test.cmd.license module

spack.test.cmd.license.test_list_files()[source]
spack.test.cmd.license.test_verify(tmpdir)[source]

spack.test.cmd.list module

spack.test.cmd.list.test_list()[source]
spack.test.cmd.list.test_list_filter(mock_packages)[source]
spack.test.cmd.list.test_list_format_html(mock_packages)[source]
spack.test.cmd.list.test_list_format_name_only(mock_packages)[source]
spack.test.cmd.list.test_list_format_version_json(mock_packages)[source]
spack.test.cmd.list.test_list_search_description(mock_packages)[source]
spack.test.cmd.list.test_list_update(tmpdir, mock_packages)[source]

spack.test.cmd.load module

spack.test.cmd.load.test_load(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test that the commands generated by load add the specified prefix inspections. Also test that Spack records loaded specs by hash in the user environment.

CMAKE_PREFIX_PATH is the only prefix inspection guaranteed for fake packages, since it keys on the prefix instead of a subdir.

spack.test.cmd.load.test_load_fails_no_shell(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test that spack load prints an error message without a shell.

spack.test.cmd.load.test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test with and without the –first option

spack.test.cmd.load.test_load_includes_run_env(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Tests that environment changes from the package’s setup_run_environment method are added to the user environment in addition to the prefix inspections

spack.test.cmd.load.test_load_recursive(install_mockery, mock_fetch, mock_archive, mock_packages)[source]

Test that the ‘-r’ option to the load command prepends dependency prefix inspections in post-order

spack.test.cmd.load.test_unload(install_mockery, mock_fetch, mock_archive, mock_packages, working_env)[source]

Tests that any variables set in the user environment are undone by the unload command

spack.test.cmd.load.test_unload_fails_no_shell(install_mockery, mock_fetch, mock_archive, mock_packages, working_env)[source]

Test that spack unload prints an error message without a shell.

spack.test.cmd.location module

spack.test.cmd.location.mock_spec()[source]
spack.test.cmd.location.test_location_build_dir(mock_spec)[source]

Tests spack location –build-dir.

spack.test.cmd.location.test_location_cmd_error(options)[source]

Ensure the proper error is raised with problematic location options.

spack.test.cmd.location.test_location_env_exists(mutable_mock_env_path)[source]

Tests spack location –env <name> for an existing environment.

spack.test.cmd.location.test_location_env_flag_interference(mutable_mock_env_path, tmpdir)[source]

Tests that specifying an active environment using spack -e x location … does not interfere with the location command flags.

spack.test.cmd.location.test_location_env_missing()[source]

Tests spack location –env.

spack.test.cmd.location.test_location_install_dir(mock_spec)[source]

Tests spack location –install-dir.

spack.test.cmd.location.test_location_package_dir(mock_spec)[source]

Tests spack location –package-dir.

spack.test.cmd.location.test_location_paths_options(option, expected)[source]

Tests basic spack.paths location command options.

spack.test.cmd.location.test_location_source_dir(mock_spec)[source]

Tests spack location –source-dir.

spack.test.cmd.location.test_location_source_dir_missing()[source]

Tests spack location –source-dir with a missing source directory.

spack.test.cmd.location.test_location_spec_errors(specs, expected)[source]

Tests spack location with bad spec options.

spack.test.cmd.location.test_location_stage_dir(mock_spec)[source]

Tests spack location –stage-dir.

spack.test.cmd.location.test_location_stages(mock_spec)[source]

Tests spack location –stages.

spack.test.cmd.location.test_location_with_active_env(mutable_mock_env_path)[source]

Tests spack location –env with active env

spack.test.cmd.maintainers module

spack.test.cmd.maintainers.split(output)[source]

Split command line output into an array.

spack.test.cmd.maintainers.test_all(mock_packages, capfd)[source]
spack.test.cmd.maintainers.test_all_by_user(mock_packages, capfd)[source]
spack.test.cmd.maintainers.test_maintained(mock_packages)[source]
spack.test.cmd.maintainers.test_maintainers_list_by_user(mock_packages, capfd)[source]
spack.test.cmd.maintainers.test_maintainers_list_fails(mock_packages, capfd)[source]
spack.test.cmd.maintainers.test_maintainers_list_packages(mock_packages, capfd)[source]
spack.test.cmd.maintainers.test_mutex_args_fail(mock_packages)[source]
spack.test.cmd.maintainers.test_no_args(mock_packages)[source]
spack.test.cmd.maintainers.test_no_args_by_user(mock_packages)[source]
spack.test.cmd.maintainers.test_unmaintained(mock_packages)[source]

spack.test.cmd.mark module

spack.test.cmd.mark.test_mark_all_explicit(mutable_database)[source]
spack.test.cmd.mark.test_mark_all_implicit(mutable_database)[source]
spack.test.cmd.mark.test_mark_all_implicit_then_explicit(mutable_database)[source]
spack.test.cmd.mark.test_mark_mode_required(mutable_database)[source]
spack.test.cmd.mark.test_mark_one_explicit(mutable_database)[source]
spack.test.cmd.mark.test_mark_one_implicit(mutable_database)[source]
spack.test.cmd.mark.test_mark_spec_required(mutable_database)[source]

spack.test.cmd.mirror module

class spack.test.cmd.mirror.MockMirrorArgs(specs=None, all=False, file=None, versions_per_spec=None, dependencies=False, exclude_file=None, exclude_specs=None)[source]

Bases: object

spack.test.cmd.mirror.source_for_pkg_with_hash(mock_packages, tmpdir)[source]
spack.test.cmd.mirror.test_exclude_file(mock_packages, tmpdir, config)[source]
spack.test.cmd.mirror.test_exclude_specs(mock_packages, config)[source]
spack.test.cmd.mirror.test_mirror_crud(tmp_scope, capsys)[source]
spack.test.cmd.mirror.test_mirror_destroy(install_mockery_mutable_config, mock_packages, mock_fetch, mock_archive, mutable_config, monkeypatch, tmpdir)[source]
spack.test.cmd.mirror.test_mirror_from_env(tmpdir, mock_packages, mock_fetch, config, mutable_mock_env_path)[source]
spack.test.cmd.mirror.test_mirror_name_collision(tmp_scope)[source]
spack.test.cmd.mirror.test_mirror_nonexisting(tmp_scope)[source]
spack.test.cmd.mirror.test_mirror_skip_unstable(tmpdir_factory, mock_packages, config, source_for_pkg_with_hash)[source]
spack.test.cmd.mirror.test_regression_8083(tmpdir, capfd, mock_packages, mock_fetch, config)[source]
spack.test.cmd.mirror.tmp_scope()[source]

Creates a temporary configuration scope

spack.test.cmd.module module

spack.test.cmd.module.ensure_module_files_are_there(mock_repo_path, mock_store, mock_configuration_scopes)[source]

Generate module files for module tests.

spack.test.cmd.module.failure_args(request)[source]

A list of arguments that will cause a failure

spack.test.cmd.module.module_type(request)[source]
spack.test.cmd.module.test_exit_with_failure(database, module_type, failure_args)[source]
spack.test.cmd.module.test_find(database, cli_args, module_type)[source]
spack.test.cmd.module.test_find_fails_on_multiple_matches()[source]
spack.test.cmd.module.test_find_fails_on_non_existing_packages()[source]
spack.test.cmd.module.test_find_recursive()[source]
spack.test.cmd.module.test_find_recursive_blacklisted(database, module_configuration)[source]
spack.test.cmd.module.test_loads_recursive_blacklisted(database, module_configuration)[source]
spack.test.cmd.module.test_remove_and_add(database, module_type)[source]

Tests adding and removing a tcl module file.

spack.test.cmd.module.test_setdefault_command(mutable_database, module_configuration)[source]

spack.test.cmd.pkg module

spack.test.cmd.pkg.mock_pkg_git_repo(tmpdir_factory)[source]

Copy the builtin.mock repo and make a mutable git repo inside it.

spack.test.cmd.pkg.mock_pkg_names()[source]
spack.test.cmd.pkg.pkg_template = 'from spack import *\n\nclass {name}(Package):\n    homepage = "http://www.example.com"\n    url      = "http://www.example.com/test-1.0.tar.gz"\n\n    version(\'1.0\', \'0123456789abcdef0123456789abcdef\')\n\n    def install(self, spec, prefix):\n        pass\n'

new fake package template

spack.test.cmd.pkg.split(output)[source]

Split command line output into an array.

spack.test.cmd.pkg.test_mock_packages_path(mock_packages)[source]
spack.test.cmd.pkg.test_packages_path()[source]
spack.test.cmd.pkg.test_pkg_add(mock_pkg_git_repo)[source]
spack.test.cmd.pkg.test_pkg_added(mock_pkg_git_repo)[source]
spack.test.cmd.pkg.test_pkg_changed(mock_pkg_git_repo)[source]
spack.test.cmd.pkg.test_pkg_diff(mock_pkg_git_repo, mock_pkg_names)[source]
spack.test.cmd.pkg.test_pkg_fails_when_not_git_repo(monkeypatch)[source]
spack.test.cmd.pkg.test_pkg_list(mock_pkg_git_repo, mock_pkg_names)[source]
spack.test.cmd.pkg.test_pkg_removed(mock_pkg_git_repo)[source]

spack.test.cmd.print_shell_vars module

spack.test.cmd.print_shell_vars.test_print_shell_vars_csh(capsys)[source]
spack.test.cmd.print_shell_vars.test_print_shell_vars_csh_modules(capsys)[source]
spack.test.cmd.print_shell_vars.test_print_shell_vars_sh(capsys)[source]
spack.test.cmd.print_shell_vars.test_print_shell_vars_sh_modules(capsys)[source]

spack.test.cmd.providers module

spack.test.cmd.providers.test_it_just_fails(pkg, error_cls)[source]
spack.test.cmd.providers.test_it_just_runs(pkg)[source]
spack.test.cmd.providers.test_provider_lists(vpkg, provider_list)[source]

spack.test.cmd.python module

spack.test.cmd.python.test_python()[source]
spack.test.cmd.python.test_python_interpreter_path()[source]
spack.test.cmd.python.test_python_raises()[source]
spack.test.cmd.python.test_python_version()[source]
spack.test.cmd.python.test_python_with_module()[source]

spack.test.cmd.reindex module

spack.test.cmd.reindex.test_reindex_basic(mock_packages, mock_archive, mock_fetch, install_mockery)[source]
spack.test.cmd.reindex.test_reindex_db_deleted(mock_packages, mock_archive, mock_fetch, install_mockery)[source]
spack.test.cmd.reindex.test_reindex_with_deprecated_packages(mock_packages, mock_archive, mock_fetch, install_mockery)[source]

spack.test.cmd.repo module

spack.test.cmd.repo.test_create_add_list_remove(mutable_config, tmpdir)[source]
spack.test.cmd.repo.test_help_option()[source]

spack.test.cmd.resource module

spack.test.cmd.resource.mock_hashes = ['abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234', '1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd', 'b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c', 'c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8', '24eceabef5fe8f575ff4b438313dc3e7b30f6a2d1c78841fbbe3b9293a589277', '689b8f9b32cb1d2f9271d29ea3fca2e1de5df665e121fca14e1364b711450deb', 'ebe27f9930b99ebd8761ed2db3ea365142d0bafd78317efb4baadf62c7bf94d0', '208fcfb50e5a965d5757d151b675ca4af4ce2dfd56401721b6168fae60ab798f', 'bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c', '7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730']

these are hashes used in mock packages

spack.test.cmd.resource.test_resource_list(mock_packages, capfd)[source]
spack.test.cmd.resource.test_resource_list_only_hashes(mock_packages, capfd)[source]
spack.test.cmd.resource.test_resource_show(mock_packages, capfd)[source]

spack.test.cmd.spec module

spack.test.cmd.spec.test_spec()[source]
spack.test.cmd.spec.test_spec_deptypes_edges()[source]
spack.test.cmd.spec.test_spec_deptypes_nodes()[source]
spack.test.cmd.spec.test_spec_json()[source]
spack.test.cmd.spec.test_spec_returncode()[source]
spack.test.cmd.spec.test_spec_yaml()[source]

spack.test.cmd.stage module

spack.test.cmd.stage.check_stage_path(monkeypatch, tmpdir)[source]
spack.test.cmd.stage.test_stage_full_env(mutable_mock_env_path, monkeypatch)[source]

Verify that stage filters specs in environment.

spack.test.cmd.stage.test_stage_path(check_stage_path)[source]

Verify that –path only works with single specs.

spack.test.cmd.stage.test_stage_path_errors_multiple_specs(check_stage_path)[source]

Verify that –path only works with single specs.

spack.test.cmd.stage.test_stage_spec(monkeypatch)[source]

Verify that staging specs works.

spack.test.cmd.stage.test_stage_with_env_inside_env(mutable_mock_env_path, monkeypatch)[source]

Verify that stage filters specs in environment instead of reconcretizing.

spack.test.cmd.stage.test_stage_with_env_outside_env(mutable_mock_env_path, monkeypatch)[source]

Verify that stage concretizes specs not in environment instead of erroring.

spack.test.cmd.style module

spack.test.cmd.style.external_style_root(flake8_package_with_errors, tmpdir)[source]

Create a mock git repository for running spack style.

spack.test.cmd.style.flake8_package()[source]

Style only checks files that have been modified. This fixture makes a small change to the flake8 mock package, yields the filename, then undoes the change on cleanup.

spack.test.cmd.style.flake8_package_with_errors(scope='function')[source]

A flake8 package with errors.

spack.test.cmd.style.style_data = '/home/docs/checkouts/readthedocs.org/user_builds/spack/checkouts/v0.17.0/lib/spack/docs/_spack_root/lib/spack/spack/test/data/style'

directory with sample style files

spack.test.cmd.style.test_bad_bootstrap(monkeypatch)[source]

Ensure we fail gracefully when we can’t bootstrap spack style.

spack.test.cmd.style.test_bad_root(tmpdir)[source]

Ensure that spack style doesn’t run on non-spack directories.

spack.test.cmd.style.test_changed_files(flake8_package)[source]
spack.test.cmd.style.test_changed_files_all_files(flake8_package)[source]
spack.test.cmd.style.test_changed_no_base(tmpdir, capfd)[source]

Ensure that we fail gracefully with no base branch.

spack.test.cmd.style.test_external_root(external_style_root)[source]

Ensure we can run in a separate root directory w/o configuration files.

spack.test.cmd.style.test_fail_on_old_python()[source]

Ensure that spack style runs but fails with older python.

spack.test.cmd.style.test_fix_style(external_style_root)[source]

Make sure spack style –fix works.

spack.test.cmd.style.test_style(flake8_package, tmpdir)[source]
spack.test.cmd.style.test_style_is_package(tmpdir)[source]

Ensure the is_package() function works.

spack.test.cmd.style.test_style_with_black(flake8_package_with_errors)[source]
spack.test.cmd.style.test_style_with_errors(flake8_package_with_errors)[source]

spack.test.cmd.tags module

spack.test.cmd.tags.test_tags_all_mock_tag_packages(mock_packages)[source]
spack.test.cmd.tags.test_tags_all_mock_tags(mock_packages)[source]
spack.test.cmd.tags.test_tags_bad_options()[source]
spack.test.cmd.tags.test_tags_installed(install_mockery, mock_fetch)[source]
spack.test.cmd.tags.test_tags_invalid_tag(mock_packages)[source]
spack.test.cmd.tags.test_tags_no_installed(install_mockery, mock_fetch)[source]
spack.test.cmd.tags.test_tags_no_tags(monkeypatch)[source]

spack.test.cmd.test module

spack.test.cmd.test.test_cdash_output_test_error(tmpdir, mock_fetch, install_mockery_mutable_config, mock_packages, mock_archive, mock_test_stage, capfd)[source]
spack.test.cmd.test.test_cdash_upload_clean_test(tmpdir, mock_fetch, install_mockery_mutable_config, mock_packages, mock_archive, mock_test_stage)[source]
spack.test.cmd.test.test_has_test_method_fails(capsys)[source]
spack.test.cmd.test.test_junit_output_with_failures(tmpdir, mock_test_stage, pkg_name, msgs)[source]
spack.test.cmd.test.test_show_log_on_error(mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config, capfd, mock_test_stage)[source]

Make sure spack prints location of test log on failure.

spack.test.cmd.test.test_test_dirty_flag(arguments, expected)[source]
spack.test.cmd.test.test_test_dup_alias(mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config, capfd)[source]

Ensure re-using an alias fails with suggestion to change.

spack.test.cmd.test.test_test_help_cdash(mock_test_stage)[source]

Make sure spack test –help-cdash describes CDash arguments

spack.test.cmd.test.test_test_help_does_not_show_cdash_options(mock_test_stage, capsys)[source]

Make sure spack test –help does not describe CDash arguments

spack.test.cmd.test.test_test_list(mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config)[source]
spack.test.cmd.test.test_test_list_all(mock_packages)[source]

make sure spack test list –all returns all packages with tests

spack.test.cmd.test.test_test_output(mock_test_stage, mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config)[source]

Ensure output printed from pkgs is captured by output redirection.

spack.test.cmd.test.test_test_output_on_error(mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config, capfd, mock_test_stage)[source]
spack.test.cmd.test.test_test_output_on_failure(mock_packages, mock_archive, mock_fetch, install_mockery_mutable_config, capfd, mock_test_stage)[source]
spack.test.cmd.test.test_test_package_not_installed(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery_mutable_config, mock_test_stage)[source]

spack.test.cmd.undevelop module

spack.test.cmd.undevelop.test_undevelop(tmpdir, config, mock_packages, mutable_mock_env_path)[source]
spack.test.cmd.undevelop.test_undevelop_nonexistent(tmpdir, config, mock_packages, mutable_mock_env_path)[source]

spack.test.cmd.uninstall module

class spack.test.cmd.uninstall.MockArgs(packages, all=False, force=False, dependents=False)[source]

Bases: object

spack.test.cmd.uninstall.test_force_uninstall_and_reinstall_by_hash(mutable_database)[source]

Test forced uninstall and reinstall of old specs.

spack.test.cmd.uninstall.test_force_uninstall_spec_with_ref_count_not_zero(constraint, expected_number_of_specs, mutable_database)[source]
spack.test.cmd.uninstall.test_in_memory_consistency_when_uninstalling(mutable_database, monkeypatch)[source]

Test that uninstalling doesn’t raise warnings

spack.test.cmd.uninstall.test_installed_dependents(mutable_database)[source]

Test can’t uninstall when there are installed dependents.

spack.test.cmd.uninstall.test_multiple_matches(mutable_database)[source]

Test unable to uninstall when multiple matches.

spack.test.cmd.uninstall.test_recursive_uninstall(mutable_database)[source]

Test recursive uninstall.

spack.test.cmd.uninstall.test_uninstall_spec_with_multiple_roots(constraint, expected_number_of_specs, mutable_database)[source]

spack.test.cmd.unit_test module

spack.test.cmd.unit_test.test_list()[source]
spack.test.cmd.unit_test.test_list_long(capsys)[source]
spack.test.cmd.unit_test.test_list_long_with_pytest_arg(capsys)[source]
spack.test.cmd.unit_test.test_list_names()[source]
spack.test.cmd.unit_test.test_list_names_with_pytest_arg()[source]
spack.test.cmd.unit_test.test_list_with_keywords()[source]
spack.test.cmd.unit_test.test_list_with_pytest_arg()[source]
spack.test.cmd.unit_test.test_pytest_help()[source]

spack.test.cmd.url module

class spack.test.cmd.url.MyPackage(name, versions)[source]

Bases: object

spack.test.cmd.url.test_name_parsed_correctly()[source]
spack.test.cmd.url.test_url_list(mock_packages)[source]
spack.test.cmd.url.test_url_parse()[source]
spack.test.cmd.url.test_url_stats(capfd, mock_packages)[source]
spack.test.cmd.url.test_url_summary(mock_packages)[source]

Test the URL summary command.

spack.test.cmd.url.test_url_with_no_version_fails()[source]
spack.test.cmd.url.test_version_parsed_correctly()[source]

spack.test.cmd.verify module

Tests for the spack verify command

spack.test.cmd.verify.test_single_file_verify_cmd(tmpdir)[source]
spack.test.cmd.verify.test_single_spec_verify_cmd(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]

spack.test.cmd.versions module

spack.test.cmd.versions.test_new_versions_only(monkeypatch)[source]

Test a package for which new versions should be available.

spack.test.cmd.versions.test_no_unchecksummed_versions()[source]

Test a package for which no unchecksummed versions are available.

spack.test.cmd.versions.test_no_versions()[source]

Test a package for which no remote versions are available.

spack.test.cmd.versions.test_no_versions_no_url()[source]

Test a package without versions or a url attribute.

spack.test.cmd.versions.test_remote_versions()[source]

Test a package for which remote versions should be available.

spack.test.cmd.versions.test_remote_versions_only()[source]

Test a package for which remote versions should be available.

spack.test.cmd.versions.test_safe_only_versions()[source]

Only test the safe versions of a package. (Using the deprecated command line argument)

spack.test.cmd.versions.test_safe_versions()[source]

Only test the safe versions of a package.

spack.test.cmd.versions.test_versions_no_url()[source]

Test a package with versions but without a url attribute.

spack.test.cmd.view module

spack.test.cmd.view.create_projection_file(tmpdir, projection)[source]
spack.test.cmd.view.test_view_extendee_with_global_activations(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension_conflict(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension_conflict_ignored(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension_global_activation(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension_projection(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_extension_remove(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_external(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_fails_with_missing_projections_file(tmpdir)[source]
spack.test.cmd.view.test_view_multiple_projections(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_multiple_projections_all_first(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery)[source]
spack.test.cmd.view.test_view_projections(tmpdir, mock_packages, mock_archive, mock_fetch, config, install_mockery, cmd)[source]

Module contents