mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-07-24 12:53:45 +00:00
ext/python: Makes linter happy
This commit is contained in:
parent
9a8970b6a8
commit
6edf3dd3b1
2 changed files with 14 additions and 9 deletions
|
@ -144,18 +144,20 @@ def test_commit(provider):
|
|||
conn.close()
|
||||
assert record
|
||||
|
||||
|
||||
@pytest.mark.parametrize("provider", ["sqlite3", "limbo"])
|
||||
def test_with_statement(provider):
|
||||
with connect(provider, "tests/database.db") as conn:
|
||||
conn = connect(provider, "tests/database.db")
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("SELECT MAX(id) FROM users")
|
||||
|
||||
|
||||
max_id = cursor.fetchone()
|
||||
|
||||
|
||||
assert max_id
|
||||
assert max_id == (2,)
|
||||
|
||||
|
||||
def connect(provider, database):
|
||||
if provider == "limbo":
|
||||
return limbo.connect(database)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue