Save local modifications for syncing
Some checks failed
CI / lint (push) Has been cancelled
CI / unit tests (push) Has been cancelled
CI / integration tests (push) Has been cancelled
CI / package build (push) Has been cancelled
Commit lint / pull request title (push) Has been cancelled
Commit lint / commit messages (push) Has been cancelled
Some checks failed
CI / lint (push) Has been cancelled
CI / unit tests (push) Has been cancelled
CI / integration tests (push) Has been cancelled
CI / package build (push) Has been cancelled
Commit lint / pull request title (push) Has been cancelled
Commit lint / commit messages (push) Has been cancelled
This commit is contained in:
@ -9,7 +9,11 @@ from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from everos.memory.cascade.watcher import _relative_to_root, _safe_mtime
|
||||
from everos.memory.cascade.watcher import (
|
||||
_relative_to_root,
|
||||
_safe_mtime,
|
||||
_watch_roots,
|
||||
)
|
||||
|
||||
|
||||
def test_relative_to_root_within(tmp_path: Path) -> None:
|
||||
@ -34,3 +38,14 @@ def test_safe_mtime_existing_path_returns_positive(tmp_path: Path) -> None:
|
||||
f = tmp_path / "f.md"
|
||||
f.write_text("ok")
|
||||
assert _safe_mtime(str(f)) > 0
|
||||
|
||||
|
||||
def test_watch_roots_excludes_system_dot_dirs(tmp_path: Path) -> None:
|
||||
(tmp_path / ".index" / "lancedb" / "episode").mkdir(parents=True)
|
||||
(tmp_path / ".tmp").mkdir()
|
||||
(tmp_path / "default_app" / "default_project" / "users").mkdir(parents=True)
|
||||
(tmp_path / "default_app" / "default_project" / "agents").mkdir()
|
||||
|
||||
roots = _watch_roots(tmp_path)
|
||||
|
||||
assert roots == [tmp_path / "default_app"]
|
||||
|
||||
Reference in New Issue
Block a user