mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 01:44:31 +02:00
parent
aa652b6afe
commit
eea3851d40
2 changed files with 23 additions and 2 deletions
|
|
@ -24,6 +24,22 @@ def db_path(tmpdir):
|
|||
return path
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"options",
|
||||
(
|
||||
["-h"],
|
||||
["--help"],
|
||||
["insert", "-h"],
|
||||
["insert", "--help"],
|
||||
),
|
||||
)
|
||||
def test_help(options):
|
||||
result = CliRunner().invoke(cli.cli, options)
|
||||
assert result.exit_code == 0
|
||||
assert result.output.startswith("Usage: ")
|
||||
assert "-h, --help" in result.output
|
||||
|
||||
|
||||
def test_tables(db_path):
|
||||
result = CliRunner().invoke(cli.cli, ["tables", db_path])
|
||||
assert '[{"table": "Gosh"},\n {"table": "Gosh2"}]' == result.output.strip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue