Skip to content

Commit

Permalink
test only on SQLite 3.37 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Aug 15, 2024
1 parent 86c5203 commit 999b9f0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_internals_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from datasette.app import Datasette
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 .fixtures import app_client, app_client_two_attached_databases_crossdb_enabled
import pytest
Expand Down Expand Up @@ -666,7 +666,12 @@ async def test_in_memory_databases_forbid_writes(app_client):
assert await db.table_names() == ["foo"]


def pragma_table_list_supported():
return sqlite_version()[1] >= 37


@pytest.mark.asyncio
@pytest.mark.skipif(not pragma_table_list_supported(), reason="Requires PRAGMA table_list support")
async def test_hidden_tables(app_client):
ds = app_client.ds
db = ds.add_database(Database(ds, is_memory=True, is_mutable=True))
Expand Down

0 comments on commit 999b9f0

Please sign in to comment.