fix timezone handling and logging fallback robustness

This commit is contained in:
windyboy
2026-02-09 20:16:39 +08:00
parent 976a1fa1d0
commit aa0dc8ec47
13 changed files with 492 additions and 86 deletions
+7 -1
View File
@@ -7,7 +7,7 @@ from pathlib import Path
import pytest
from click.testing import CliRunner
from vlm.cli import main
from vlm.cli import main, default_config_path
@pytest.fixture
@@ -85,6 +85,12 @@ def test_state_set_and_show(runner, temp_state_file, temp_config):
assert "checked manually" in result.output
def test_default_config_path_resolves_at_runtime(tmp_path, monkeypatch):
"""Test CLI default config path follows current home directory."""
monkeypatch.setattr(Path, 'home', lambda: tmp_path)
assert default_config_path() == tmp_path / ".vlm" / "config.yaml"
def test_state_query(runner, temp_state_file, temp_config):
"""Test querying files by status."""
test_files = [