MCPcopy
hub / github.com/opentrace/opentrace / _patch_base_dir

Function _patch_base_dir

agent/tests/opentrace_agent/cli/test_auth.py:52–57  ·  view source on GitHub ↗

Redirect credentials storage to a test-local directory.

(monkeypatch: object, tmp_path: Path, subdir: str = ".opentrace")

Source from the content-addressed store, hash-verified

50
51
52def _patch_base_dir(monkeypatch: object, tmp_path: Path, subdir: str = ".opentrace") -> Path:
53 """Redirect credentials storage to a test-local directory."""
54 base = tmp_path / subdir
55 base.mkdir(parents=True, exist_ok=True)
56 monkeypatch.setattr(credentials, "_base_dir", lambda: base)
57 return base
58
59
60def _make_repo(base: Path) -> Path:

Calls

no outgoing calls

Tested by

no test coverage detected