Skip to content

Commit a480b85

Browse files
Fix CI: cache-gate study 269 baltic-dry fetch_real tests
The two test_fetch_real_* tests called fetch_real(fetch=False) which needs the gitignored _cache/shiller_sp500.parquet — green locally, FileNotFoundError in CI. Guard both with skipif(cache absent); the synthetic tests already cover the offline logic. (The lot's other Shiller-backed studies were already guarded.)
1 parent 896ec19 commit a480b85

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

studies/269-baltic-dry/tests/test_data.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def test_curated_bdi_launch_level():
7676
# ---------------------------------------------------------------------------
7777
# Real tape (offline build from Shiller + curated BDI)
7878
# ---------------------------------------------------------------------------
79+
@pytest.mark.skipif(
80+
not os.path.exists(data.SHILLER_CACHE),
81+
reason="Shiller cache absent (gitignored) — offline logic is covered by the synthetic tests",
82+
)
7983
def test_fetch_real_offline_builds():
8084
"""Cache-only fetch_real builds a (bdi, sp500) frame from Shiller + curated BDI."""
8185
df = data.fetch_real(fetch=False)
@@ -84,6 +88,10 @@ def test_fetch_real_offline_builds():
8488
assert (df > 0).all().all()
8589

8690

91+
@pytest.mark.skipif(
92+
not os.path.exists(data.SHILLER_CACHE),
93+
reason="Shiller cache absent (gitignored) — offline logic is covered by the synthetic tests",
94+
)
8795
def test_fetch_real_month_end_index():
8896
df = data.fetch_real(fetch=False)
8997
for ts in df.index[:5]:

0 commit comments

Comments
 (0)