From 193237d317f6e143798fcb87151ce7fc0cb8b0ac Mon Sep 17 00:00:00 2001 From: Yurij Mikhalevich Date: Sun, 16 Jun 2024 09:06:44 +0400 Subject: [PATCH] test: repeated searches should yield the same result --- ...t_repeated_searches_should_be_the_same.txt | 33 +++++++++++++++++++ tests/e2e/test_rclip.py | 7 ++++ 2 files changed, 40 insertions(+) create mode 100644 tests/e2e/output_snapshots/test_repeated_searches_should_be_the_same.txt diff --git a/tests/e2e/output_snapshots/test_repeated_searches_should_be_the_same.txt b/tests/e2e/output_snapshots/test_repeated_searches_should_be_the_same.txt new file mode 100644 index 0000000..0f8250c --- /dev/null +++ b/tests/e2e/output_snapshots/test_repeated_searches_should_be_the_same.txt @@ -0,0 +1,33 @@ +score filepath +0.272 "boats on a lake.png" +0.183 "chessboard with rocks.JPG" +0.151 "tree.webp" +0.151 "books.jpg" +0.149 "camera.jpg" +0.146 "cat.jpg" +0.138 "cautious cat.jpg" +0.137 "black cat at night.jpg" +0.134 "black kitty.jpeg" +0.128 "black cat sleeping on a chair.JPG" +score filepath +0.272 "boats on a lake.png" +0.183 "chessboard with rocks.JPG" +0.151 "tree.webp" +0.151 "books.jpg" +0.149 "camera.jpg" +0.146 "cat.jpg" +0.138 "cautious cat.jpg" +0.137 "black cat at night.jpg" +0.134 "black kitty.jpeg" +0.128 "black cat sleeping on a chair.JPG" +score filepath +0.272 "boats on a lake.png" +0.183 "chessboard with rocks.JPG" +0.151 "tree.webp" +0.151 "books.jpg" +0.149 "camera.jpg" +0.146 "cat.jpg" +0.138 "cautious cat.jpg" +0.137 "black cat at night.jpg" +0.134 "black kitty.jpeg" +0.128 "black cat sleeping on a chair.JPG" diff --git a/tests/e2e/test_rclip.py b/tests/e2e/test_rclip.py index ff4ddac..c80f570 100644 --- a/tests/e2e/test_rclip.py +++ b/tests/e2e/test_rclip.py @@ -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'))