Repair official collection and retire exhausted material tasks
Development CI / check-and-build (push) Successful in 2m59s
GitHub Git mirror / mirror (push) Successful in 6s
Development CI / deploy-development (push) Successful in 5s

This commit is contained in:
eezd committed 2026-11-05 13:30:05 +08:00
1 parent d5d350b7ec
commit d0c2beb9b3
23 files changed
+399 -35

No files matched your search

+7
View File
@@ -123,3 +123,10 @@ def test_history_preview_requires_matching_archive_date_without_writes(trading,
assert result["announcements"].get("eia_stocks", 0) == int(valid)
assert bool(result["errors"]) != valid
save.assert_not_awaited()
def test_current_official_archive_csv_directory():
url = 'https://www.eia.gov/petroleum/supply/weekly/archive/2026/2026_10_15/wpsr_2026_10_15.php'
assert eia.csv_link('<a href="csv/table1.csv">CSV</a>', url) == url.rsplit('/', 1)[0] + '/csv/table1.csv'
with pytest.raises(ValueError):
eia.csv_link('<a href="csv/table1.csv">A</a><a href="download/table1.csv">B</a>', url)