MCPcopy Index your code
hub / github.com/dbcli/pgcli / test_pset_pager_on

Function test_pset_pager_on

tests/test_main.py:298–310  ·  view source on GitHub ↗
(term_height, term_width, text, use_pager, pset_pager_mocks)

Source from the content-addressed store, hash-verified

296
297@pytest.mark.parametrize("term_height,term_width,text,use_pager", pager_on_test_data, ids=test_ids)
298def test_pset_pager_on(term_height, term_width, text, use_pager, pset_pager_mocks):
299 cli, mock_echo, mock_echo_via_pager, mock_cli = pset_pager_mocks
300 mock_cli.output.get_size.return_value = termsize(rows=term_height, columns=term_width)
301
302 with mock.patch.object(cli.pgspecial, "pager_config", PAGER_LONG_OUTPUT):
303 cli.echo_via_pager(text)
304
305 if use_pager:
306 mock_echo.assert_not_called()
307 mock_echo_via_pager.assert_called()
308 else:
309 mock_echo_via_pager.assert_not_called()
310 mock_echo.assert_called()
311
312
313@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

echo_via_pagerMethod · 0.80

Tested by

no test coverage detected