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

Function test_pset_pager_always

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

Source from the content-addressed store, hash-verified

281
282@pytest.mark.parametrize("term_height,term_width,text", test_data, ids=test_ids)
283def test_pset_pager_always(term_height, term_width, text, pset_pager_mocks):
284 cli, mock_echo, mock_echo_via_pager, mock_cli = pset_pager_mocks
285 mock_cli.output.get_size.return_value = termsize(rows=term_height, columns=term_width)
286
287 with mock.patch.object(cli.pgspecial, "pager_config", PAGER_ALWAYS):
288 cli.echo_via_pager(text)
289
290 mock_echo.assert_not_called()
291 mock_echo_via_pager.assert_called()
292
293
294pager_on_test_data = [l + (r,) for l, r in zip(test_data, use_pager_when_on)]

Callers

nothing calls this directly

Calls 1

echo_via_pagerMethod · 0.80

Tested by

no test coverage detected