Skip to content

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.

833 B
Raw Blame
"""Every runtime test runs against a private user-data folder.

Runtime code derives its folders from ``dodaios.core.paths.user_data_dir`` (agent
folders, Jarvis' own OpenClaw copy, the last-good pins). A test that redirected
only ``runtimes_root`` once wrote stub binaries into the person's real
``agent_runtimes/openclaw-cli`` (2026-10-07), which the live app would then
have tried to run. The whole package is redirected here instead.
"""

from __future__ import annotations

from pathlib import Path

import pytest


@pytest.fixture(autouse=True)
def _private_user_data(
    monkeypatch: pytest.MonkeyPatch, tmp_path_factory: pytest.TempPathFactory
) -> Path:
    from dodaios.core import paths

    root = tmp_path_factory.mktemp("jarvis-user-data")
    monkeypatch.setattr(paths, "user_data_dir", lambda: root)
    return root