mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
Documentation and tests for table.drop() method
This commit is contained in:
parent
9cb045284e
commit
535a5ea476
3 changed files with 19 additions and 1 deletions
|
|
@ -775,3 +775,10 @@ def test_cannot_provide_both_filename_and_memory():
|
|||
def test_creates_id_column(fresh_db):
|
||||
last_pk = fresh_db.table("cats", pk="id").insert({"name": "barry"}).last_pk
|
||||
assert [{"name": "barry", "id": last_pk}] == list(fresh_db["cats"].rows)
|
||||
|
||||
|
||||
def test_drop(fresh_db):
|
||||
fresh_db["t"].insert({"foo": 1})
|
||||
assert ["t"] == fresh_db.table_names()
|
||||
assert None is fresh_db["t"].drop()
|
||||
assert [] == fresh_db.table_names()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue