mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-12 03:24:23 +02:00
Skip plugin test that needs pragma_function_list
Refs https://github.com/simonw/sqlite-utils/pull/654#issuecomment-2860924225
This commit is contained in:
parent
b3942fb34f
commit
0d1d9aef48
1 changed files with 14 additions and 0 deletions
|
|
@ -1,9 +1,19 @@
|
|||
from click.testing import CliRunner
|
||||
import click
|
||||
import importlib
|
||||
import pytest
|
||||
from sqlite_utils import cli, Database, hookimpl, plugins
|
||||
|
||||
|
||||
def _supports_pragma_function_list():
|
||||
db = Database(memory=True)
|
||||
try:
|
||||
db.execute("select * from pragma_function_list()")
|
||||
except Exception:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def test_register_commands():
|
||||
importlib.reload(cli)
|
||||
assert plugins.get_plugins() == []
|
||||
|
|
@ -37,6 +47,10 @@ def test_register_commands():
|
|||
assert plugins.get_plugins() == []
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not _supports_pragma_function_list(),
|
||||
reason="Needs SQLite version that supports pragma_function_list()",
|
||||
)
|
||||
def test_prepare_connection():
|
||||
importlib.reload(cli)
|
||||
assert plugins.get_plugins() == []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue