mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
test only on SQLite 3.37 and above
This commit is contained in:
parent
86c5203451
commit
999b9f0353
1 changed files with 6 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ Tests for the datasette.database.Database class
|
||||||
|
|
||||||
from datasette.app import Datasette
|
from datasette.app import Datasette
|
||||||
from datasette.database import Database, Results, MultipleValues
|
from datasette.database import Database, Results, MultipleValues
|
||||||
from datasette.utils.sqlite import sqlite3
|
from datasette.utils.sqlite import sqlite3, sqlite_version
|
||||||
from datasette.utils import Column
|
from datasette.utils import Column
|
||||||
from .fixtures import app_client, app_client_two_attached_databases_crossdb_enabled
|
from .fixtures import app_client, app_client_two_attached_databases_crossdb_enabled
|
||||||
import pytest
|
import pytest
|
||||||
|
|
@ -666,7 +666,12 @@ async def test_in_memory_databases_forbid_writes(app_client):
|
||||||
assert await db.table_names() == ["foo"]
|
assert await db.table_names() == ["foo"]
|
||||||
|
|
||||||
|
|
||||||
|
def pragma_table_list_supported():
|
||||||
|
return sqlite_version()[1] >= 37
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
@pytest.mark.skipif(not pragma_table_list_supported(), reason="Requires PRAGMA table_list support")
|
||||||
async def test_hidden_tables(app_client):
|
async def test_hidden_tables(app_client):
|
||||||
ds = app_client.ds
|
ds = app_client.ds
|
||||||
db = ds.add_database(Database(ds, is_memory=True, is_mutable=True))
|
db = ds.add_database(Database(ds, is_memory=True, is_mutable=True))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue