Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed May 14, 2024
1 parent 55a7848 commit cf6aafb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/ai/test_classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_return_index(self):
assert result == 1

class TestExamples:
@pytest.mark.flaky(max_runs=3)
async def test_hogwarts_sorting_hat(self):
description = "Brave, daring, chivalrous, and sometimes a bit reckless -- just like Harry Potter."

Expand Down
3 changes: 1 addition & 2 deletions tests/ai/vision/test_classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def test_ny_image_and_text(self):
"https://images.unsplash.com/photo-1568515387631-8b650bbcdb90"
)
result = marvin.classify(
data="I see the empire state building",
images=[img],
data=["I see a tall building", img],
labels=["urban", "rural"],
)
assert result == "urban"
Expand Down
2 changes: 1 addition & 1 deletion tests/ai/vision/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_dog_breeds_with_text(self):
"https://images.unsplash.com/photo-1548199973-03cce0bbc87b?q=80&w=2969&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
)
result = marvin.extract(
[img, "collie"],
[img, "Another type is: collie"],
target=str,
instructions="extract all dog breeds pictured or mentioned",
)
Expand Down

0 comments on commit cf6aafb

Please sign in to comment.