Ran black, refs #111

This commit is contained in:
Simon Willison 2020-05-10 18:26:16 -07:00
commit 98019e92d0
2 changed files with 4 additions and 33 deletions

View file

@ -658,7 +658,6 @@ def drop_view(path, view):
raise click.ClickException('View "{}" does not exist'.format(view))
@cli.command()
@click.argument(
"path",

View file

@ -1073,14 +1073,7 @@ def test_drop_table():
db = Database("test.db")
db["t"].create({"pk": int}, pk="pk")
assert "t" in db.table_names()
result = runner.invoke(
cli.cli,
[
"drop-table",
"test.db",
"t",
],
)
result = runner.invoke(cli.cli, ["drop-table", "test.db", "t",],)
assert 0 == result.exit_code
assert "t" not in db.table_names()
@ -1090,14 +1083,7 @@ def test_drop_table_error():
with runner.isolated_filesystem():
db = Database("test.db")
db["t"].create({"pk": int}, pk="pk")
result = runner.invoke(
cli.cli,
[
"drop-table",
"test.db",
"t2",
],
)
result = runner.invoke(cli.cli, ["drop-table", "test.db", "t2",],)
assert 1 == result.exit_code
assert 'Error: Table "t2" does not exist' == result.output.strip()
@ -1108,14 +1094,7 @@ def test_drop_view():
db = Database("test.db")
db.create_view("hello", "select 1")
assert "hello" in db.view_names()
result = runner.invoke(
cli.cli,
[
"drop-view",
"test.db",
"hello",
],
)
result = runner.invoke(cli.cli, ["drop-view", "test.db", "hello",],)
assert 0 == result.exit_code
assert "hello" not in db.view_names()
@ -1125,13 +1104,6 @@ def test_drop_view_error():
with runner.isolated_filesystem():
db = Database("test.db")
db["t"].create({"pk": int}, pk="pk")
result = runner.invoke(
cli.cli,
[
"drop-view",
"test.db",
"t2",
],
)
result = runner.invoke(cli.cli, ["drop-view", "test.db", "t2",],)
assert 1 == result.exit_code
assert 'Error: View "t2" does not exist' == result.output.strip()