mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-27 06:56:39 +03:00
test: keep the CLI's saved selections out of the user's home (#1395)
- every test saves and reads CLI selections under its own tmp_path
This commit is contained in:
@@ -45,6 +45,12 @@ def _no_network(request, monkeypatch):
|
||||
monkeypatch.setattr(socket.socket, "connect_ex", refuse)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _own_cli_prefs(tmp_path, monkeypatch):
|
||||
"""The CLI keeps the last run's selections in the user's home; tests keep theirs apart."""
|
||||
monkeypatch.setattr("cli.prefs._PREFS_PATH", tmp_path / "cli_prefs.json")
|
||||
|
||||
|
||||
_API_KEY_ENV_VARS = (
|
||||
"OPENAI_API_KEY",
|
||||
"GOOGLE_API_KEY",
|
||||
|
||||
Reference in New Issue
Block a user