mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-14 05:14:22 +02:00
Use db.table() and db.view() in tests, closes #838
This commit is contained in:
parent
43d5d3331f
commit
38fe466700
43 changed files with 1321 additions and 1254 deletions
|
|
@ -11,8 +11,8 @@ def test_roundtrip_integers(integer):
|
|||
row = {
|
||||
"integer": integer,
|
||||
}
|
||||
db["test"].insert(row)
|
||||
assert list(db["test"].rows) == [row]
|
||||
db.table("test").insert(row)
|
||||
assert list(db.table("test").rows) == [row]
|
||||
|
||||
|
||||
@given(st.text())
|
||||
|
|
@ -21,8 +21,8 @@ def test_roundtrip_text(text):
|
|||
row = {
|
||||
"text": text,
|
||||
}
|
||||
db["test"].insert(row)
|
||||
assert list(db["test"].rows) == [row]
|
||||
db.table("test").insert(row)
|
||||
assert list(db.table("test").rows) == [row]
|
||||
|
||||
|
||||
@given(st.binary(max_size=1024 * 1024))
|
||||
|
|
@ -31,8 +31,8 @@ def test_roundtrip_binary(binary):
|
|||
row = {
|
||||
"binary": binary,
|
||||
}
|
||||
db["test"].insert(row)
|
||||
assert list(db["test"].rows) == [row]
|
||||
db.table("test").insert(row)
|
||||
assert list(db.table("test").rows) == [row]
|
||||
|
||||
|
||||
@given(st.floats(allow_nan=False))
|
||||
|
|
@ -41,5 +41,5 @@ def test_roundtrip_floats(floats):
|
|||
row = {
|
||||
"floats": floats,
|
||||
}
|
||||
db["test"].insert(row)
|
||||
assert list(db["test"].rows) == [row]
|
||||
db.table("test").insert(row)
|
||||
assert list(db.table("test").rows) == [row]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue