MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_read_secret_eof

Function test_read_secret_eof

tests/test_cmd2.py:2252–2258  ·  view source on GitHub ↗

Test that read_secret passes up EOFErrors.

(base_app, monkeypatch)

Source from the content-addressed store, hash-verified

2250
2251
2252def test_read_secret_eof(base_app, monkeypatch):
2253 """Test that read_secret passes up EOFErrors."""
2254 read_raw_mock = mock.MagicMock(name="_read_raw_input", side_effect=EOFError)
2255 monkeypatch.setattr("cmd2.Cmd._read_raw_input", read_raw_mock)
2256
2257 with pytest.raises(EOFError):
2258 base_app.read_secret("Secret: ")
2259
2260
2261def test_read_input_passes_all_arguments_to_resolver(base_app):

Callers

nothing calls this directly

Calls 1

read_secretMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…