spack.test.cmd package

Submodules

spack.test.cmd.blame module

spack.test.cmd.blame.test_blame_by_git(builtin_mock, capfd)

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_by_modtime(builtin_mock)

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_by_percent(builtin_mock)

Sanity check the blame command to make sure it works.

spack.test.cmd.blame.test_blame_file(builtin_mock)

Sanity check the blame command to make sure it works.

spack.test.cmd.clean module

spack.test.cmd.clean.mock_calls_for_clean(monkeypatch)
spack.test.cmd.clean.test_function_calls(command_line, counters)

spack.test.cmd.dependencies module

spack.test.cmd.dependencies.test_immediate_dependencies(builtin_mock)
spack.test.cmd.dependencies.test_immediate_installed_dependencies(builtin_mock, database)
spack.test.cmd.dependencies.test_transitive_dependencies(builtin_mock)
spack.test.cmd.dependencies.test_transitive_installed_dependencies(builtin_mock, database)

spack.test.cmd.dependents module

spack.test.cmd.dependents.test_immediate_dependents(builtin_mock)
spack.test.cmd.dependents.test_immediate_installed_dependents(builtin_mock, database)
spack.test.cmd.dependents.test_transitive_dependents(builtin_mock)
spack.test.cmd.dependents.test_transitive_installed_dependents(builtin_mock, database)

spack.test.cmd.env module

spack.test.cmd.env.test_it_just_fails(pkg, error_cls)
spack.test.cmd.env.test_it_just_runs(pkg)

spack.test.cmd.find module

class spack.test.cmd.find.TestFindWithTags

Bases: object

pytestmark = [<MarkDecorator 'usefixtures' {'args': ('database', 'mock_display'), 'kwargs': {}}>]
test_tag1(parser, specs)
test_tag2(parser, specs)
test_tag2_tag3(parser, specs)
spack.test.cmd.find.mock_display(monkeypatch, specs)

Monkeypatches the display function to return its first argument

spack.test.cmd.find.parser()

Returns the parser for the module command

spack.test.cmd.find.specs()
spack.test.cmd.find.test_query_arguments()

spack.test.cmd.flake8 module

spack.test.cmd.flake8.flake8_package()

Flake8 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.flake8.parser()

Returns the parser for the flake8 command

spack.test.cmd.flake8.test_changed_files(parser, flake8_package)
spack.test.cmd.flake8.test_flake8(parser, flake8_package)

spack.test.cmd.gpg module

spack.test.cmd.gpg.gpg()
spack.test.cmd.gpg.has_gnupg2()
spack.test.cmd.gpg.test_gpg(gpg, tmpdir, testing_gpg_directory)
spack.test.cmd.gpg.testing_gpg_directory(tmpdir)

spack.test.cmd.info module

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

Returns the parser for the module command

spack.test.cmd.info.test_info_fields(pkg_query, parser, info_lines)
spack.test.cmd.info.test_it_just_runs(pkg)

spack.test.cmd.install module

spack.test.cmd.install.noop_install(monkeypatch)
spack.test.cmd.install.parser()

Returns the parser for the module command

spack.test.cmd.install.test_install_dirty_flag(parser, arguments, expected)
spack.test.cmd.install.test_install_output_on_build_error(builtin_mock, mock_archive, mock_fetch, config, install_mockery, capfd)
spack.test.cmd.install.test_install_output_on_python_error(builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.install.test_install_overwrite(builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.install.test_install_package_already_installed(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.install.test_install_package_and_dependency(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.install.test_install_runtests()
spack.test.cmd.install.test_install_with_source(builtin_mock, mock_archive, mock_fetch, config, install_mockery)

Verify that source has been copied into place.

spack.test.cmd.install.test_package_output(tmpdir, capsys, install_mockery, mock_fetch)

Ensure output printed from pkgs is captured by output redirection.

spack.test.cmd.install.test_show_log_on_error(builtin_mock, mock_archive, mock_fetch, config, install_mockery, capfd)

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

spack.test.cmd.list module

class spack.test.cmd.list.TestListCommand

Bases: object

pytestmark = [<MarkDecorator 'usefixtures' {'args': ('mock_name_only',), 'kwargs': {}}>]
test_list_with_filters(parser, pkg_names)
test_list_without_filters(parser, pkg_names)
spack.test.cmd.list.mock_name_only(monkeypatch, pkg_names)
spack.test.cmd.list.parser()

Returns the parser for the module command

spack.test.cmd.list.pkg_names()

spack.test.cmd.module module

spack.test.cmd.module.failure_args(request)

A list of arguments that will cause a failure

spack.test.cmd.module.parser()

Returns the parser for the module command

spack.test.cmd.module.test_exit_with_failure(database, parser, failure_args)
spack.test.cmd.module.test_find(database, parser)

Tests the ‘spack module find’ under a few common scenarios.

spack.test.cmd.module.test_remove_and_add_dotkit(database, parser)

Tests adding and removing a dotkit module file.

spack.test.cmd.module.test_remove_and_add_tcl(database, parser)

Tests adding and removing a tcl module file.

spack.test.cmd.python module

spack.test.cmd.python.test_python()

spack.test.cmd.test_compiler_cmd module

class spack.test.cmd.test_compiler_cmd.TestCompilerCommand

Bases: object

pytestmark = [<MarkDecorator 'usefixtures' {'args': ('config', 'builtin_mock'), 'kwargs': {}}>]
test_compiler_add(mock_compiler_dir)
test_compiler_remove()
spack.test.cmd.test_compiler_cmd.mock_compiler_dir(tmpdir)

Return a directory containing a fake, but detectable compiler.

spack.test.cmd.uninstall module

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

Bases: object

spack.test.cmd.uninstall.test_installed_dependents(database)

Test can’t uninstall when ther are installed dependents.

spack.test.cmd.uninstall.test_multiple_matches(database)

Test unable to uninstall when multiple matches.

spack.test.cmd.uninstall.test_recursive_uninstall(database)

Test recursive uninstall.

spack.test.cmd.url module

class spack.test.cmd.url.MyPackage(name, versions)
spack.test.cmd.url.test_name_parsed_correctly()
spack.test.cmd.url.test_url_list()
spack.test.cmd.url.test_url_parse()
spack.test.cmd.url.test_url_summary()

Test the URL summary command.

spack.test.cmd.url.test_url_with_no_version_fails()
spack.test.cmd.url.test_version_parsed_correctly()

spack.test.cmd.view module

spack.test.cmd.view.test_view_extendee_with_global_activations(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_extension(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_extension_conflict(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_extension_conflict_ignored(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_extension_global_activation(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_extension_remove(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)
spack.test.cmd.view.test_view_external(tmpdir, builtin_mock, mock_archive, mock_fetch, config, install_mockery)

Module contents