Skip to content

Commit 0d1d9ae

Browse files
committed
Skip plugin test that needs pragma_function_list
Refs #654 (comment)
1 parent b3942fb commit 0d1d9ae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_plugins.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
from click.testing import CliRunner
22
import click
33
import importlib
4+
import pytest
45
from sqlite_utils import cli, Database, hookimpl, plugins
56

67

8+
def _supports_pragma_function_list():
9+
db = Database(memory=True)
10+
try:
11+
db.execute("select * from pragma_function_list()")
12+
except Exception:
13+
return False
14+
return True
15+
16+
717
def test_register_commands():
818
importlib.reload(cli)
919
assert plugins.get_plugins() == []
@@ -37,6 +47,10 @@ def hello_world():
3747
assert plugins.get_plugins() == []
3848

3949

50+
@pytest.mark.skipif(
51+
not _supports_pragma_function_list(),
52+
reason="Needs SQLite version that supports pragma_function_list()",
53+
)
4054
def test_prepare_connection():
4155
importlib.reload(cli)
4256
assert plugins.get_plugins() == []

0 commit comments

Comments
 (0)