mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-27 06:56:39 +03:00
- --ticker, --date and --analysts answer their steps, checked as the prompts check them; --save/--no-save and --show/--no-show answer the questions after the run - with no terminal, the run stops before it starts and names every flag or TRADINGAGENTS_* variable still needed; a missing API key and an announcement no longer wait for input - README shows an unattended run
This commit is contained in:
@@ -45,6 +45,15 @@ def _no_network(request, monkeypatch):
|
||||
monkeypatch.setattr(socket.socket, "connect_ex", refuse)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _at_a_terminal(monkeypatch):
|
||||
"""Tests of the interactive steps run as if at a terminal; pytest's stdin is
|
||||
not one. A test of an unattended run sets isatty to False itself."""
|
||||
import sys
|
||||
|
||||
monkeypatch.setattr(sys.stdin, "isatty", lambda: True)
|
||||
|
||||
|
||||
@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."""
|
||||
|
||||
Reference in New Issue
Block a user