MCPcopy Create free account
hub / github.com/dbcli/mycli / patch_progress_mode

Function patch_progress_mode

test/pytests/test_main_modes_batch.py:162–169  ·  view source on GitHub ↗
(monkeypatch, mycli_main, mycli_main_batch)

Source from the content-addressed store, hash-verified

160
161
162def patch_progress_mode(monkeypatch, mycli_main, mycli_main_batch) -> None:
163 DummyProgressBar.calls.clear()
164 monkeypatch.setattr(mycli_main_batch, 'ProgressBar', DummyProgressBar)
165 monkeypatch.setattr(mycli_main_batch.prompt_toolkit.output, 'create_output', lambda **kwargs: object())
166 fake_sys = make_fake_sys(stdin_tty=False, stderr_tty=True)
167 monkeypatch.setattr(cli_runner, 'sys', fake_sys)
168 monkeypatch.setattr(mycli_main, 'sys', fake_sys)
169 monkeypatch.setattr(mycli_main_batch, 'sys', fake_sys)
170
171
172def invoke_click_batch(

Calls 1

make_fake_sysFunction · 0.85

Tested by

no test coverage detected