mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-28 11:54:32 +02:00
parent
ce670e2d44
commit
0cee77b176
3 changed files with 24 additions and 14 deletions
|
|
@ -19,7 +19,7 @@ def test_rows_from_file_detect_format(input, expected_format):
|
|||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"ignore_extras,restkey,expected",
|
||||
"ignore_extras,extras_key,expected",
|
||||
(
|
||||
(True, None, [{"id": "1", "name": "Cleo"}]),
|
||||
(False, "_rest", [{"id": "1", "name": "Cleo", "_rest": ["oops"]}]),
|
||||
|
|
@ -27,13 +27,13 @@ def test_rows_from_file_detect_format(input, expected_format):
|
|||
(False, False, None),
|
||||
),
|
||||
)
|
||||
def test_rows_from_file_extra_fields_strategies(ignore_extras, restkey, expected):
|
||||
def test_rows_from_file_extra_fields_strategies(ignore_extras, extras_key, expected):
|
||||
try:
|
||||
rows, format = rows_from_file(
|
||||
BytesIO(b"id,name\r\n1,Cleo,oops"),
|
||||
format=Format.CSV,
|
||||
ignore_extras=ignore_extras,
|
||||
restkey=restkey,
|
||||
extras_key=extras_key,
|
||||
)
|
||||
list_rows = list(rows)
|
||||
except RowError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue