mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 09:54:31 +02:00
sqlite-utils memory --functions, refs #471
This commit is contained in:
parent
85e7411bbd
commit
59e2cfbdc1
3 changed files with 33 additions and 11 deletions
|
|
@ -289,3 +289,12 @@ def test_memory_two_files_with_same_stem(tmpdir):
|
|||
");\n"
|
||||
"CREATE VIEW t2 AS select * from [data_2];\n"
|
||||
)
|
||||
|
||||
|
||||
def test_memory_functions():
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
["memory", "select hello()", "--functions", "hello = lambda: 'Hello'"],
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
assert result.output.strip() == '[{"hello()": "Hello"}]'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue