mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
--ignore for sqlite-utils drop-table and drop-view, closes #237
This commit is contained in:
parent
c236894caa
commit
bba6e241be
3 changed files with 36 additions and 9 deletions
|
|
@ -1397,7 +1397,17 @@ def test_drop_table_error():
|
|||
)
|
||||
assert 1 == result.exit_code
|
||||
assert 'Error: Table "t2" does not exist' == result.output.strip()
|
||||
|
||||
# Using --ignore supresses that error
|
||||
result = runner.invoke(
|
||||
cli.cli,
|
||||
[
|
||||
"drop-table",
|
||||
"test.db",
|
||||
"t2",
|
||||
"--ignore"
|
||||
],
|
||||
)
|
||||
assert 0 == result.exit_code
|
||||
|
||||
def test_drop_view():
|
||||
runner = CliRunner()
|
||||
|
|
@ -1432,6 +1442,17 @@ def test_drop_view_error():
|
|||
)
|
||||
assert 1 == result.exit_code
|
||||
assert 'Error: View "t2" does not exist' == result.output.strip()
|
||||
# Using --ignore supresses that error
|
||||
result = runner.invoke(
|
||||
cli.cli,
|
||||
[
|
||||
"drop-view",
|
||||
"test.db",
|
||||
"t2",
|
||||
"--ignore"
|
||||
],
|
||||
)
|
||||
assert 0 == result.exit_code
|
||||
|
||||
|
||||
def test_enable_wal():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue