Skip to content

Commit

Permalink
test: repeated searches should yield the same result
Browse files Browse the repository at this point in the history
  • Loading branch information
yurijmikhalevich committed Jun 16, 2024
1 parent a7cbdd5 commit 193237d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
score filepath
0.272 "<test_images_dir>boats on a lake.png"
0.183 "<test_images_dir>chessboard with rocks.JPG"
0.151 "<test_images_dir>tree.webp"
0.151 "<test_images_dir>books.jpg"
0.149 "<test_images_dir>camera.jpg"
0.146 "<test_images_dir>cat.jpg"
0.138 "<test_images_dir>cautious cat.jpg"
0.137 "<test_images_dir>black cat at night.jpg"
0.134 "<test_images_dir>black kitty.jpeg"
0.128 "<test_images_dir>black cat sleeping on a chair.JPG"
score filepath
0.272 "<test_images_dir>boats on a lake.png"
0.183 "<test_images_dir>chessboard with rocks.JPG"
0.151 "<test_images_dir>tree.webp"
0.151 "<test_images_dir>books.jpg"
0.149 "<test_images_dir>camera.jpg"
0.146 "<test_images_dir>cat.jpg"
0.138 "<test_images_dir>cautious cat.jpg"
0.137 "<test_images_dir>black cat at night.jpg"
0.134 "<test_images_dir>black kitty.jpeg"
0.128 "<test_images_dir>black cat sleeping on a chair.JPG"
score filepath
0.272 "<test_images_dir>boats on a lake.png"
0.183 "<test_images_dir>chessboard with rocks.JPG"
0.151 "<test_images_dir>tree.webp"
0.151 "<test_images_dir>books.jpg"
0.149 "<test_images_dir>camera.jpg"
0.146 "<test_images_dir>cat.jpg"
0.138 "<test_images_dir>cautious cat.jpg"
0.137 "<test_images_dir>black cat at night.jpg"
0.134 "<test_images_dir>black kitty.jpeg"
0.128 "<test_images_dir>black cat sleeping on a chair.JPG"
7 changes: 7 additions & 0 deletions tests/e2e/test_rclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ def test_search_png(test_images_dir: Path, monkeypatch: pytest.MonkeyPatch):
execute_query(test_images_dir, monkeypatch, 'boats on a lake')


@pytest.mark.usefixtures('assert_output_snapshot')
def test_repeated_searches_should_be_the_same(test_images_dir: Path, monkeypatch: pytest.MonkeyPatch):
execute_query(test_images_dir, monkeypatch, 'boats on a lake')
execute_query(test_images_dir, monkeypatch, 'boats on a lake')
execute_query(test_images_dir, monkeypatch, 'boats on a lake')


@pytest.mark.usefixtures('assert_output_snapshot')
def test_search_by_image(test_images_dir: Path, monkeypatch: pytest.MonkeyPatch):
execute_query(test_images_dir, monkeypatch, str(test_images_dir / 'cat.jpg'))
Expand Down

0 comments on commit 193237d

Please sign in to comment.