mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Ran black, refs #111
This commit is contained in:
parent
4e9cb739c7
commit
98019e92d0
2 changed files with 4 additions and 33 deletions
|
|
@ -658,7 +658,6 @@ def drop_view(path, view):
|
|||
raise click.ClickException('View "{}" does not exist'.format(view))
|
||||
|
||||
|
||||
|
||||
@cli.command()
|
||||
@click.argument(
|
||||
"path",
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue