diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index a56b39dc1b5..40f2e22936e 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -569,7 +569,6 @@ def test_FetchCacheError_only_accepts_lists_of_errors(): def test_FetchCacheError_pretty_printing_multiple(): e = bindist.FetchCacheError([RuntimeError("Oops!"), TypeError("Trouble!")]) str_e = str(e) - print("'" + str_e + "'") assert "Multiple errors" in str_e assert "Error 1: RuntimeError: Oops!" in str_e assert "Error 2: TypeError: Trouble!" in str_e diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 550afafc19c..1a8f79c3b7f 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -210,7 +210,6 @@ def check_args_contents(cc, args, must_contain, must_not_contain): """ with set_env(SPACK_TEST_COMMAND="dump-args"): cc_modified_args = cc(*args, output=str).strip().split("\n") - print(cc_modified_args) for a in must_contain: assert a in cc_modified_args for a in must_not_contain: diff --git a/lib/spack/spack/test/ci.py b/lib/spack/spack/test/ci.py index 2e67709696b..afbe02fd79e 100644 --- a/lib/spack/spack/test/ci.py +++ b/lib/spack/spack/test/ci.py @@ -347,7 +347,6 @@ def test_get_spec_filter_list(mutable_mock_env_path, mutable_mock_repo): for key, val in expectations.items(): affected_specs = ci.get_spec_filter_list(e1, touched, dependent_traverse_depth=key) affected_pkg_names = set([s.name for s in affected_specs]) - print(f"{key}: {affected_pkg_names}") assert affected_pkg_names == val diff --git a/lib/spack/spack/test/cmd/buildcache.py b/lib/spack/spack/test/cmd/buildcache.py index 83e99459219..f350874485d 100644 --- a/lib/spack/spack/test/cmd/buildcache.py +++ b/lib/spack/spack/test/cmd/buildcache.py @@ -214,9 +214,7 @@ def verify_mirror_contents(): if in_env_pkg in p: found_pkg = True - if not found_pkg: - print("Expected to find {0} in {1}".format(in_env_pkg, dest_mirror_dir)) - assert False + assert found_pkg, f"Expected to find {in_env_pkg} in {dest_mirror_dir}" # Install a package and put it in the buildcache s = spack.concretize.concretize_one(out_env_pkg) diff --git a/lib/spack/spack/test/cmd/install.py b/lib/spack/spack/test/cmd/install.py index 88ec80639ac..70fdf0c7644 100644 --- a/lib/spack/spack/test/cmd/install.py +++ b/lib/spack/spack/test/cmd/install.py @@ -898,7 +898,6 @@ def test_cdash_configure_warning(tmpdir, mock_fetch, install_mockery, capfd): specfile = "./spec.json" with open(specfile, "w", encoding="utf-8") as f: f.write(spec.to_json()) - print(spec.to_json()) install("--log-file=cdash_reports", "--log-format=cdash", specfile) # Verify Configure.xml exists with expected contents. report_dir = tmpdir.join("cdash_reports") diff --git a/lib/spack/spack/test/cmd/unit_test.py b/lib/spack/spack/test/cmd/unit_test.py index bef7c0a4c29..06ad0e5e744 100644 --- a/lib/spack/spack/test/cmd/unit_test.py +++ b/lib/spack/spack/test/cmd/unit_test.py @@ -50,7 +50,7 @@ def test_list_long(capsys): def test_list_long_with_pytest_arg(capsys): with capsys.disabled(): output = spack_test("--list-long", cmd_test_py) - print(output) + assert "unit_test.py::\n" in output assert "test_list" in output assert "test_list_with_pytest_arg" in output diff --git a/lib/spack/spack/test/cmd/verify.py b/lib/spack/spack/test/cmd/verify.py index 5ada2fe9f8e..9143efdd9ce 100644 --- a/lib/spack/spack/test/cmd/verify.py +++ b/lib/spack/spack/test/cmd/verify.py @@ -49,7 +49,6 @@ def test_single_file_verify_cmd(tmpdir): sjson.dump({filepath: data}, f) results = verify("manifest", "-f", filepath, fail_on_error=False) - print(results) assert not results os.utime(filepath, (0, 0)) diff --git a/lib/spack/spack/test/concretization/core.py b/lib/spack/spack/test/concretization/core.py index b75856a72a9..25012b3d4db 100644 --- a/lib/spack/spack/test/concretization/core.py +++ b/lib/spack/spack/test/concretization/core.py @@ -2018,7 +2018,6 @@ def test_git_ref_version_is_equivalent_to_specified_version(self, git_ref): s = Spec("develop-branch-version@git.%s=develop" % git_ref) c = spack.concretize.concretize_one(s) assert git_ref in str(c) - print(str(c)) assert s.satisfies("@develop") assert s.satisfies("@0.1:") diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index b8ce54d0640..bedd330c446 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -2148,7 +2148,6 @@ def _c_compiler_always_exists(): @pytest.fixture(scope="session") def mock_test_cache(tmp_path_factory): cache_dir = tmp_path_factory.mktemp("cache") - print(cache_dir) return spack.util.file_cache.FileCache(cache_dir) diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 65e90274211..170b336c817 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -977,7 +977,6 @@ class MyBuildException(Exception): def _install_fail_my_build_exception(installer, task, install_status, **kwargs): - print(task, task.pkg.name) if task.pkg.name == "pkg-a": raise MyBuildException("mock internal package build error for pkg-a") else: diff --git a/lib/spack/spack/test/rewiring.py b/lib/spack/spack/test/rewiring.py index 282e16a8f1b..320f0ed78f1 100644 --- a/lib/spack/spack/test/rewiring.py +++ b/lib/spack/spack/test/rewiring.py @@ -27,9 +27,7 @@ def check_spliced_spec_prefixes(spliced_spec): text_file_path = os.path.join(node.prefix, node.name) with open(text_file_path, "r", encoding="utf-8") as f: text = f.read() - print(text) for modded_spec in node.traverse(root=True, deptype=dt.ALL & ~dt.BUILD): - print(modded_spec) assert modded_spec.prefix in text diff --git a/lib/spack/spack/test/util/environment.py b/lib/spack/spack/test/util/environment.py index 2409325dc4e..191bfd88073 100644 --- a/lib/spack/spack/test/util/environment.py +++ b/lib/spack/spack/test/util/environment.py @@ -149,11 +149,8 @@ def test_reverse_environment_modifications(working_env): os.environ.clear() os.environ.update(start_env) - print(os.environ) to_reverse.apply_modifications() - print(os.environ) reversal.apply_modifications() - print(os.environ) start_env.pop("UNSET") assert os.environ == start_env diff --git a/lib/spack/spack/test/util/unparse/unparse.py b/lib/spack/spack/test/util/unparse/unparse.py index 4a8b624894c..f22d04fa57c 100644 --- a/lib/spack/spack/test/util/unparse/unparse.py +++ b/lib/spack/spack/test/util/unparse/unparse.py @@ -257,7 +257,6 @@ def test_core_lib_files(): names.append(os.path.join(test_dir, n)) for filename in names: - print("Testing %s" % filename) source = read_pyfile(filename) check_ast_roundtrip(source)