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
7 changes: 4 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for sentrysearch.cli (Click CLI)."""

import os
from unittest.mock import MagicMock, patch

import pytest
Expand Down Expand Up @@ -753,7 +754,7 @@ def test_search_save_top_1_writes_cache(self, runner, _isolated_cache):
assert result.exit_code == 0, result.output
assert _isolated_cache.is_file()
data = self._read_cache(_isolated_cache)
assert data["path"] == "/tmp/clip1.mp4"
assert data["path"] == os.path.abspath("/tmp/clip1.mp4")
assert data["saved_by"] == "sentrysearch"
assert "Saved clip path cached for sentryblur" in result.output

Expand All @@ -776,7 +777,7 @@ def test_search_save_top_3_caches_rank_1(self, runner, _isolated_cache):

assert result.exit_code == 0, result.output
data = self._read_cache(_isolated_cache)
assert data["path"] == "/tmp/rank1.mp4"
assert data["path"] == os.path.abspath("/tmp/rank1.mp4")

def test_img_save_top_writes_cache(self, runner, tmp_path, _isolated_cache):
img_path = tmp_path / "q.jpg"
Expand All @@ -798,7 +799,7 @@ def test_img_save_top_writes_cache(self, runner, tmp_path, _isolated_cache):

assert result.exit_code == 0, result.output
data = self._read_cache(_isolated_cache)
assert data["path"] == "/tmp/img_clip.mp4"
assert data["path"] == os.path.abspath("/tmp/img_clip.mp4")

def test_overlay_writes_cache(self, runner, tmp_path, _isolated_cache):
video = tmp_path / "in.mp4"
Expand Down
Loading