mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-16 13:34:10 +02:00
Fix load extension tests, refs #470
This commit is contained in:
parent
dac8dec343
commit
72db599ae0
1 changed files with 2 additions and 3 deletions
|
|
@ -2298,17 +2298,16 @@ def test_duplicate_table(tmpdir):
|
||||||
assert list(db["one"].rows) == list(db["two"].rows)
|
assert list(db["one"].rows) == list(db["two"].rows)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
@pytest.mark.skipif(not _has_compiled_ext(), reason="Requires compiled ext.c")
|
@pytest.mark.skipif(not _has_compiled_ext(), reason="Requires compiled ext.c")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"entrypoint,should_pass,should_fail",
|
"entrypoint,should_pass,should_fail",
|
||||||
(
|
(
|
||||||
(None, ("a", "b", "c"), ()),
|
(None, ("a",), ("b", "c")),
|
||||||
("sqlite3_ext_b_init", ("b"), ("a", "c")),
|
("sqlite3_ext_b_init", ("b"), ("a", "c")),
|
||||||
("sqlite3_ext_c_init", ("c"), ("a", "b")),
|
("sqlite3_ext_c_init", ("c"), ("a", "b")),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
async def test_load_extension(entrypoint, should_pass, should_fail):
|
def test_load_extension(entrypoint, should_pass, should_fail):
|
||||||
ext = COMPILED_EXTENSION_PATH
|
ext = COMPILED_EXTENSION_PATH
|
||||||
if entrypoint:
|
if entrypoint:
|
||||||
ext += ":" + entrypoint
|
ext += ":" + entrypoint
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue