mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
move connect at the top
This commit is contained in:
parent
1c373fd275
commit
dd913dec22
1 changed files with 7 additions and 8 deletions
|
|
@ -1,9 +1,15 @@
|
|||
import os
|
||||
import sqlite3
|
||||
|
||||
import pytest
|
||||
import turso
|
||||
|
||||
def connect(provider, database):
|
||||
if provider == "turso":
|
||||
return turso.connect(database)
|
||||
if provider == "sqlite3":
|
||||
return sqlite3.connect(database)
|
||||
raise Exception(f"Provider `{provider}` is not supported")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup_database():
|
||||
|
|
@ -206,10 +212,3 @@ def test_with_statement(provider):
|
|||
assert max_id
|
||||
assert max_id == (2,)
|
||||
|
||||
|
||||
def connect(provider, database):
|
||||
if provider == "turso":
|
||||
return turso.connect(database)
|
||||
if provider == "sqlite3":
|
||||
return sqlite3.connect(database)
|
||||
raise Exception(f"Provider `{provider}` is not supported")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue