mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Skip test if pragma_function_list not supported, refs #471
This commit is contained in:
parent
31f062d4a7
commit
85e7411bbd
1 changed files with 13 additions and 0 deletions
|
|
@ -12,6 +12,15 @@ import textwrap
|
|||
from .utils import collapse_whitespace
|
||||
|
||||
|
||||
def _supports_pragma_function_list():
|
||||
db = Database(memory=True)
|
||||
try:
|
||||
db.execute("select * from pragma_function_list()")
|
||||
except Exception:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"options",
|
||||
(
|
||||
|
|
@ -753,6 +762,10 @@ def test_query_complex_function(db_path):
|
|||
]
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
not _supports_pragma_function_list(),
|
||||
reason="Needs SQLite version that supports pragma_function_list()",
|
||||
)
|
||||
def test_hidden_functions_are_hidden(db_path):
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue