Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
chore(i18n): re-apply German test translation (test_cleanup, redo after concurrent revert)
Ruben Lütke04e57358df61
diff --git a/tests/missions/test_cleanup.py b/tests/missions/test_cleanup.pyindex c356737322..ff784363c7 100644--- a/tests/missions/test_cleanup.py+++ b/tests/missions/test_cleanup.py@@ -1,4 +1,4 @@-"""Tests fuer cleanup.startup_sweep + daily_cleanup_task."""+"""Tests for cleanup.startup_sweep + daily_cleanup_task."""from __future__ import annotationsimport asyncio@@ -22,7 +22,7 @@ from jarvis.missions.cleanup import (@pytest.mark.asyncioasync def test_sweep_nonexistent_root_returns_zero(tmp_path: Path) -> None:- """Wenn isolation_root nicht existiert: sauberer Return mit zeros."""+ """If isolation_root does not exist: clean return with zeros."""nonexistent = tmp_path / "nonexistent"stats = await startup_sweep(isolation_root=nonexistent)assert stats == {"scanned": 0, "removed": 0, "errors": 0}@@ -39,7 +39,7 @@ async def test_sweep_empty_root_no_action(tmp_path: Path) -> None:@pytest.mark.asyncioasync def test_sweep_keeps_recent_directories(tmp_path: Path) -> None:- """Direktories juenger als cleanup_days bleiben unangetastet."""+ """Directories younger than cleanup_days remain untouched."""root = tmp_path / "outputs"root.mkdir()fresh = root / "mission_fresh"@@ -54,14 +54,14 @@ async def test_sweep_keeps_recent_directories(tmp_path: Path) -> None:@pytest.mark.asyncioasync def test_sweep_removes_old_directories(tmp_path: Path) -> None:- """Direktories aelter als cleanup_days werden entfernt."""+ """Directories older than cleanup_days are removed."""root = tmp_path / "outputs"root.mkdir()old = root / "mission_old"old.mkdir()(old / "log.txt").write_text("old")- # mtime auf 30 Tage zurueck setzen+ # Set mtime back 30 daysthirty_days_ago = time.time() - (30 * 86400)os.utime(old, (thirty_days_ago, thirty_days_ago))@@ -95,15 +95,15 @@ async def test_sweep_mixed_keeps_fresh_removes_old(tmp_path: Path) -> None:@pytest.mark.asyncioasync def test_sweep_cleanup_days_zero_removes_anything(tmp_path: Path) -> None:- """Mit cleanup_days=0 sollten alle gefundenen Dirs entfernt werden — die- exakte Anzahl haengt allerdings von der FS-mtime-Aufloesung ab; wir- pruefen nur dass mindestens einer entfernt wird (kein Crash, sweep- funktioniert)."""+ """With cleanup_days=0, all found dirs should be removed — the+ exact count depends on the FS mtime resolution though; we+ only check that at least one gets removed (no crash, sweep+ works)."""root = tmp_path / "outputs"root.mkdir()a = root / "a"a.mkdir()- # Setze mtime explizit in die Vergangenheit damit age_seconds > 0 garantiert ist+ # Set mtime explicitly in the past so age_seconds > 0 is guaranteedpast = time.time() - 1.0os.utime(a, (past, past))b = root / "b"@@ -117,8 +117,8 @@ async def test_sweep_cleanup_days_zero_removes_anything(tmp_path: Path) -> None:@pytest.mark.asyncioasync def test_sweep_handles_locked_files_gracefully(tmp_path: Path) -> None:- """Wenn rmtree partial failt (z.B. file lock), errors-counter geht hoch- aber sweep crasht nicht."""+ """If rmtree partially fails (e.g. a file lock), the errors counter goes up+ but the sweep doesn't crash."""root = tmp_path / "outputs"root.mkdir()old = root / "mission_old"@@ -127,9 +127,9 @@ async def test_sweep_handles_locked_files_gracefully(tmp_path: Path) -> None:thirty_days_ago = time.time() - (30 * 86400)os.utime(old, (thirty_days_ago, thirty_days_ago))- # Even wenn rmtree mit ignore_errors=True versucht, sollte stats valide sein+ # Even if rmtree tries with ignore_errors=True, stats should be validstats = await startup_sweep(isolation_root=root, cleanup_days=14)- # In normaler Fall: removed=1+ # In the normal case: removed=1assert stats["scanned"] == 1@@ -215,10 +215,10 @@ async def test_daily_task_runs_sweep_then_cancels(tmp_path: Path) -> None:))- # 250ms warten -> 2 sweeps sollten gelaufen sein+ # Wait 250ms -> 2 sweeps should have runawait asyncio.sleep(0.25)- # Cancel + sauberer Exit+ # Cancel + clean exittask.cancel()with pytest.raises(asyncio.CancelledError):await task@@ -226,7 +226,7 @@ async def test_daily_task_runs_sweep_then_cancels(tmp_path: Path) -> None:@pytest.mark.asyncioasync def test_daily_task_continues_on_sweep_error(tmp_path: Path, monkeypatch) -> None:- """Wenn ein sweep crasht, soll der Task weiter laufen (catch-und-log)."""+ """If a sweep crashes, the task should keep running (catch-and-log)."""root = tmp_path / "outputs"root.mkdir()@@ -234,7 +234,7 @@ async def test_daily_task_continues_on_sweep_error(tmp_path: Path, monkeypatch)async def crashing_sweep(*args, **kwargs):call_count["n"] += 1- raise RuntimeError("simuliert")+ raise RuntimeError("simulated")monkeypatch.setattr("jarvis.missions.cleanup.startup_sweep", crashing_sweep)@@ -253,7 +253,7 @@ async def test_daily_task_continues_on_sweep_error(tmp_path: Path, monkeypatch)except asyncio.CancelledError:pass- # Trotz Crashes wurde mehrfach versucht+ # Despite crashes, it was retried multiple timesassert call_count["n"] >= 2