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

Function test_template_shellcheck

tests/test_header.py:100–174  ·  view source on GitHub ↗
(
    osx,
    arch,
    has_pre_install,
    has_post_install,
    initialize_conda,
    initialize_by_default,
    has_license,
    has_conda,
    keep_pkgs,
    batch_mode,
    direct_execute_pre_install,
    direct_execute_post_install,
    check_path_spaces,
    enable_shortcuts,
    min_glibc_version,
    min_osx_version,
    conda_exe_payloads_and_size,
)

Source from the content-addressed store, hash-verified

98@pytest.mark.parametrize("min_osx_version", ["10.13"])
99@pytest.mark.parametrize("conda_exe_payloads_and_size", [({"path": (0, 10, False)}, 10)])
100def test_template_shellcheck(
101 osx,
102 arch,
103 has_pre_install,
104 has_post_install,
105 initialize_conda,
106 initialize_by_default,
107 has_license,
108 has_conda,
109 keep_pkgs,
110 batch_mode,
111 direct_execute_pre_install,
112 direct_execute_post_install,
113 check_path_spaces,
114 enable_shortcuts,
115 min_glibc_version,
116 min_osx_version,
117 conda_exe_payloads_and_size,
118):
119 template = read_header_template()
120 processed = render_template(
121 template,
122 **{
123 "has_license": has_license,
124 "osx": osx,
125 "batch_mode": batch_mode,
126 "keep_pkgs": keep_pkgs,
127 "has_conda": has_conda,
128 "x86": arch == "x86",
129 "x86_64": arch == "x86_64",
130 "ppc64le": arch == "ppc64le",
131 "s390x": arch == "s390x",
132 "aarch64": arch == "aarch64",
133 "arm64": arch == "arm64",
134 "linux": not osx,
135 "has_pre_install": has_pre_install,
136 "direct_execute_pre_install": direct_execute_pre_install,
137 "has_post_install": has_post_install,
138 "direct_execute_post_install": direct_execute_post_install,
139 "initialize_conda": initialize_conda,
140 "initialize_by_default": initialize_by_default,
141 "check_path_spaces": check_path_spaces,
142 "enable_shortcuts": enable_shortcuts,
143 "min_glibc_version": min_glibc_version,
144 "min_osx_version": min_osx_version,
145 "first_payload_size": "1024",
146 "second_payload_size": "512",
147 "constructor_version": __version__,
148 "installer_name": "Example",
149 "installer_version": "1.2.3",
150 "installer_platform": "linux-64",
151 "installer_md5": "a0098a2c837f4cf50180cfc0a041b2af",
152 "script_env_variables": {}, # TODO: Fill this in with actual value
153 "default_prefix": "/opt/Example",
154 "license": "Some text",
155 "total_installation_size_kb": "1024",
156 "virtual_specs": "__glibc>=2.17",
157 "shortcuts": "",

Callers

nothing calls this directly

Calls 3

read_header_templateFunction · 0.90
render_templateFunction · 0.90
run_shellcheckFunction · 0.85

Tested by

no test coverage detected