File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11from click .testing import CliRunner
22import click
33import importlib
4+ import pytest
45from 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+
717def 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+ )
4054def test_prepare_connection ():
4155 importlib .reload (cli )
4256 assert plugins .get_plugins () == []
You can’t perform that action at this time.
0 commit comments