MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / test_env_passed_to_subprocess

Method test_env_passed_to_subprocess

tests/test_cmd.py:111–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

109 assert result.return_code == 42
110
111 def test_env_passed_to_subprocess(self):
112 result = cmd.run(
113 ["python", "-c", "import os; print(os.environ['CZ_TEST_VAR'])"],
114 env={"CZ_TEST_VAR": "sentinelvalue"},
115 )
116 assert "sentinelvalue" in result.out
117 assert result.return_code == 0
118
119 def test_env_merged_with_os_environ(self, monkeypatch):
120 monkeypatch.setenv("CZ_EXISTING_VAR", "fromenv")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected