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

Method test_stderr_captured

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

Source from the content-addressed store, hash-verified

93 assert b"hello" in result.stdout
94
95 def test_stderr_captured(self):
96 result = cmd.run(
97 ["python", "-c", "import sys; print('err msg', file=sys.stderr)"]
98 )
99 assert "err msg" in result.err
100 assert isinstance(result.stderr, bytes)
101 assert b"err msg" in result.stderr
102
103 def test_zero_return_code_on_success(self):
104 result = cmd.run(["python", "-c", "import sys; sys.exit(0)"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected