Progress bar for sqlite-utils insert command, closes #173

This commit is contained in:
Simon Willison 2020-10-27 11:16:02 -07:00 committed by GitHub
commit f99a236529
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 5 deletions

View file

@ -1640,7 +1640,9 @@ def test_insert_encoding(tmpdir):
open(csv_path, "wb").write(latin1_csv)
# First attempt should error:
bad_result = CliRunner().invoke(
cli.cli, ["insert", db_path, "places", csv_path, "--csv"]
cli.cli,
["insert", db_path, "places", csv_path, "--csv"],
catch_exceptions=False,
)
assert bad_result.exit_code == 1
assert (
@ -1651,6 +1653,7 @@ def test_insert_encoding(tmpdir):
good_result = CliRunner().invoke(
cli.cli,
["insert", db_path, "places", csv_path, "--encoding", "latin-1", "--csv"],
catch_exceptions=False,
)
assert good_result.exit_code == 0
db = Database(db_path)