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

Function test_example_signing

tests/test_examples.py:1085–1102  ·  view source on GitHub ↗
(tmp_path, request)

Source from the content-addressed store, hash-verified

1083
1084@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")
1085def test_example_signing(tmp_path, request):
1086 input_path = _example_path("signing")
1087 cert_path = tmp_path / "self-signed-cert.pfx"
1088 cert_pwd = "1234"
1089 _self_signed_certificate_windows(path=cert_path, password=cert_pwd)
1090 assert cert_path.exists()
1091 certificate_in_input_dir = input_path / "certificate.pfx"
1092 shutil.copy(str(cert_path), str(certificate_in_input_dir))
1093 request.addfinalizer(lambda: certificate_in_input_dir.unlink())
1094 for installer, install_dir in create_installer(
1095 input_path,
1096 tmp_path,
1097 with_spaces=True,
1098 CONSTRUCTOR_SIGNING_CERTIFICATE=str(cert_path),
1099 CONSTRUCTOR_PFX_CERTIFICATE_PASSWORD=cert_pwd,
1100 ):
1101 _verify_windows_signature(installer)
1102 _run_installer(input_path, installer, install_dir, request=request)
1103
1104
1105@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")

Callers

nothing calls this directly

Calls 5

_example_pathFunction · 0.85
create_installerFunction · 0.85
_run_installerFunction · 0.85

Tested by

no test coverage detected