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

Function test_execute_arg_warns_about_ignoring_stdin

test/pytests/test_main.py:1926–1936  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

1924
1925
1926def test_execute_arg_warns_about_ignoring_stdin(monkeypatch):
1927 mycli_main, mycli_main_batch, MockMyCli = noninteractive_mock_mycli(monkeypatch)
1928 runner = CliRunner()
1929
1930 # the test env should make sure stdin is not a TTY
1931 result = runner.invoke(mycli_main.click_entrypoint, args=['--execute', 'select 1;'])
1932
1933 # this exit_code is as written currently, but a debatable choice,
1934 # since there was a warning
1935 assert result.exit_code == 0
1936 assert 'Ignoring STDIN' in result.output
1937
1938
1939def test_verbose_and_quiet_are_incompatible() -> None:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected