Test that passing a string to cmd.run_interactive emits a DeprecationWarning.
(self)
| 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 | |
| 195 | class TestRunInteractiveShell: |
nothing calls this directly
no outgoing calls
no test coverage detected