mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-27 06:56:39 +03:00
style: normalise blank lines between definitions
- two between top-level definitions, one between methods, none doubled inside a body
This commit is contained in:
@@ -182,7 +182,6 @@ def test_existing_key_file_is_tightened_before_writing(monkeypatch, prompts, tmp
|
||||
assert "OTHER=1" in env.read_text()
|
||||
|
||||
|
||||
|
||||
@pytest.mark.skipif(os.name == "nt", reason="POSIX file modes")
|
||||
def test_read_only_key_file_is_still_updated(monkeypatch, prompts, tmp_path):
|
||||
env = tmp_path / ".env"
|
||||
|
||||
@@ -58,8 +58,6 @@ def _bare_graph(tmpdir, *, enabled=True):
|
||||
return g
|
||||
|
||||
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_disabled_is_a_noop():
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
@@ -103,7 +103,6 @@ class TestCheckpointResume(unittest.TestCase):
|
||||
|
||||
self.assertEqual(result["count"], 11)
|
||||
|
||||
|
||||
def test_different_date_starts_fresh(self):
|
||||
"""A different date must NOT resume from an existing checkpoint."""
|
||||
global _should_crash
|
||||
|
||||
@@ -15,6 +15,7 @@ from tradingagents.llm_clients.factory import _coerce_max_retries, build_llm_kwa
|
||||
|
||||
# --- coercion / validation -------------------------------------------------
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.parametrize("value,expected", [(0, 0), (2, 2), (10, 10), ("6", 6)])
|
||||
def test_coerce_accepts_non_negative_ints_and_numeric_strings(value, expected):
|
||||
|
||||
@@ -17,6 +17,7 @@ from tradingagents.llm_clients.factory import _coerce_max_tokens, build_llm_kwar
|
||||
|
||||
# --- coercion / validation -------------------------------------------------
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
@pytest.mark.parametrize("value,expected", [(1, 1), (8192, 8192), ("4096", 4096)])
|
||||
def test_coerce_accepts_positive_ints_and_numeric_strings(value, expected):
|
||||
|
||||
@@ -106,7 +106,6 @@ def test_global_news_empty_after_filter_is_informative(monkeypatch):
|
||||
assert "unavailable" in out and "not an absence" in out
|
||||
|
||||
|
||||
|
||||
def _ticker_with(articles, monkeypatch):
|
||||
class FakeTicker:
|
||||
def __init__(self, *a, **k):
|
||||
@@ -162,7 +161,6 @@ def test_coverage_gap_boundaries(dates, expect_gap):
|
||||
assert "unavailable for 2026-05-01..2026-05-08" in out and "not an absence" in out
|
||||
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_ticker_news_empty_feed_for_a_past_window_is_unavailable(monkeypatch):
|
||||
_ticker_with([], monkeypatch)
|
||||
|
||||
@@ -30,6 +30,7 @@ def _stamp(path, ts):
|
||||
|
||||
# --- date normalization -----------------------------------------------------
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_normalize_dates_strips_tz_and_normalizes_to_midnight():
|
||||
aware = pd.Series(pd.to_datetime(
|
||||
|
||||
@@ -251,7 +251,6 @@ def test_posts_from_an_unrequested_or_unnamed_subreddit_are_not_dropped():
|
||||
assert "NO LABEL" in out
|
||||
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_each_subreddit_keeps_its_own_quota():
|
||||
busy = [{"title": f"A{i}", "created_utc": None, "selftext": "", "subreddit": "a"} for i in range(9)]
|
||||
|
||||
@@ -172,7 +172,6 @@ def test_reddit_live_empty_feed_is_a_real_absence(monkeypatch):
|
||||
assert "unavailable" not in out
|
||||
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_stocktwits_empty_stream_for_a_past_window_is_unavailable(monkeypatch):
|
||||
monkeypatch.setattr(stocktwits, "urlopen", lambda *a, **k: _JsonResp({"messages": []}))
|
||||
@@ -180,7 +179,6 @@ def test_stocktwits_empty_stream_for_a_past_window_is_unavailable(monkeypatch):
|
||||
assert "unavailable" in out and "not an absence" in out
|
||||
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_reddit_window_straddling_the_lookback_is_unavailable(monkeypatch):
|
||||
# Ten days ago through five days ago: the week-long search never reaches the
|
||||
|
||||
Reference in New Issue
Block a user