sqlite-utils dump command, closes #274

This commit is contained in:
Simon Willison 2021-06-16 16:51:48 -07:00
commit ca2b26130f
3 changed files with 35 additions and 0 deletions

View file

@ -502,6 +502,13 @@ def test_vacuum(db_path):
assert 0 == result.exit_code
def test_dump(db_path):
result = CliRunner().invoke(cli.cli, ["dump", db_path])
assert result.exit_code == 0
assert result.output.startswith("BEGIN TRANSACTION;")
assert result.output.strip().endswith("COMMIT;")
@pytest.mark.parametrize("tables", ([], ["Gosh"], ["Gosh2"]))
def test_optimize(db_path, tables):
db = Database(db_path)