mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-25 19:34:12 +02:00
.table_names and .tables properties plus expanded docs
This commit is contained in:
parent
f4907f6df5
commit
515d362ad6
5 changed files with 54 additions and 11 deletions
|
|
@ -1,6 +1,15 @@
|
|||
from .fixtures import existing_db
|
||||
|
||||
|
||||
def test_table_names(existing_db):
|
||||
assert ["foo"] == existing_db.table_names
|
||||
|
||||
|
||||
def test_tables(existing_db):
|
||||
assert 1 == len(existing_db.tables)
|
||||
assert "foo" == existing_db.tables[0].name
|
||||
|
||||
|
||||
def test_count(existing_db):
|
||||
assert 3 == existing_db["foo"].count
|
||||
|
||||
|
|
@ -14,3 +23,7 @@ def test_columns(existing_db):
|
|||
|
||||
def test_schema(existing_db):
|
||||
assert "CREATE TABLE foo (text TEXT)" == existing_db["foo"].schema
|
||||
|
||||
|
||||
def test_table_repr(existing_db):
|
||||
assert "<Table foo>" == repr(existing_db["foo"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue