MCPcopy Create free account
hub / github.com/conda/constructor / test_osxpkg_scripts_shellcheck

Function test_osxpkg_scripts_shellcheck

tests/test_header.py:49–79  ·  view source on GitHub ↗
(arch, check_path_spaces, script)

Source from the content-addressed store, hash-verified

47 "script", [pytest.param(path, id=str(path)) for path in sorted(Path(OSX_DIR).glob("*.sh"))]
48)
49def test_osxpkg_scripts_shellcheck(arch, check_path_spaces, script):
50 with script.open() as f:
51 data = f.read()
52 processed = render_template(
53 data,
54 arch=arch,
55 check_path_spaces=check_path_spaces,
56 pkg_name_lower="example",
57 installer_name="Example",
58 installer_version="1.2.3",
59 installer_platform="osx-64",
60 final_channels=["conda-forge"],
61 write_condarc="",
62 path_exists_error_text="Error",
63 progress_notifications=True,
64 pre_or_post="pre",
65 constructor_version=__version__,
66 shortcuts="",
67 enable_shortcuts=True,
68 register_envs=True,
69 virtual_specs="__osx>=10.13",
70 no_rcs_arg="",
71 script_env_variables={},
72 initialize_conda="condabin",
73 conda_exe_name="_conda",
74 )
75
76 findings, returncode = run_shellcheck(processed)
77 print(*findings, sep="\n")
78 assert findings == []
79 assert returncode == 0
80
81
82@pytest.mark.skipif(available_command("shellcheck") is False, reason="requires shellcheck")

Callers

nothing calls this directly

Calls 2

render_templateFunction · 0.90
run_shellcheckFunction · 0.85

Tested by

no test coverage detected