Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions tests/recipes/wrangles/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1873,20 +1873,24 @@ def test_extract_custom_ai_multiple_output(self):
Test extract.custom with AI that produces
a multi column output
"""
df = wrangles.recipe.run(
"""
read:
- test:
rows: 1
values:
header: example 1 2 3 4 5 word
wrangles:
- extract.custom:
input: header
output: results
model_id: 1f3ba62b-ce20-486e
"""
)
with patch(
"wrangles.extract.custom",
return_value=[{"Words": ["word"], "Numbers": ["1", "2", "3", "4", "5"]}]
):
df = wrangles.recipe.run(
"""
read:
- test:
rows: 1
values:
header: example 1 2 3 4 5 word
wrangles:
- extract.custom:
input: header
output: results
model_id: 1f3ba62b-ce20-486e
"""
)
assert (
"Words" in df["results"][0] and
"Numbers" in df["results"][0]
Expand Down