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

Method test_runs_with_string

tests/test_cmd.py:182–192  ·  view source on GitHub ↗

Test that passing a string to cmd.run_interactive emits a DeprecationWarning.

(self)

Source from the content-addressed store, hash-verified

180 assert return_code == 0
181
182 def test_runs_with_string(self):
183 """Test that passing a string to cmd.run_interactive emits a DeprecationWarning."""
184 import warnings
185
186 with warnings.catch_warnings(record=True) as w:
187 warnings.simplefilter("always")
188 return_code = cmd.run_interactive("python -c \"print('hello')\"")
189 assert return_code == 0
190 assert len(w) == 1
191 assert issubclass(w[0].category, DeprecationWarning)
192 assert "cmd.run_interactive()" in str(w[0].message)
193
194
195class TestRunInteractiveShell:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected