From 98019e92d0f27efa87e844b89876344ff5403c8b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 10 May 2020 18:26:16 -0700 Subject: [PATCH] Ran black, refs #111 --- sqlite_utils/cli.py | 1 - tests/test_cli.py | 36 ++++-------------------------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/sqlite_utils/cli.py b/sqlite_utils/cli.py index fd74499..4cbb13e 100644 --- a/sqlite_utils/cli.py +++ b/sqlite_utils/cli.py @@ -658,7 +658,6 @@ def drop_view(path, view): raise click.ClickException('View "{}" does not exist'.format(view)) - @cli.command() @click.argument( "path", diff --git a/tests/test_cli.py b/tests/test_cli.py index e7ded29..9cd5965 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -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()