mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 04:14:32 +02:00
Documentation for table.convert(...), refs #302
This commit is contained in:
parent
93114feefb
commit
4c3bf97305
4 changed files with 53 additions and 7 deletions
|
|
@ -38,6 +38,13 @@ def test_convert_output(fresh_db, drop, expected):
|
|||
assert list(table.rows) == [expected]
|
||||
|
||||
|
||||
def test_convert_output_multiple_column_error(fresh_db):
|
||||
table = fresh_db["table"]
|
||||
with pytest.raises(AssertionError) as excinfo:
|
||||
table.convert(["title", "other"], lambda v: v, output="out")
|
||||
assert "output= can only be used with a single column" in str(excinfo.value)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"type,expected",
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue