Add output option for chart scripts

This commit is contained in:
thePR0M3TH3AN committed 2025-05-31 07:17:41 -04:00
1 parent 956ebf31f8
commit 53eedd1929
5 files changed
+37

No files matched your search

+19
View File
@@ -45,3 +45,22 @@ def test_plot_series_and_main():
)
assert len(fig2.axes) == 1
assert any(fig2.axes[0].get_lines())
def test_custom_main_saves_output(tmp_path):
out_file = tmp_path / "chart.png"
custom_main(
[
"--series",
"UNRATE",
"--start",
"2020-01-01",
"--end",
"2020-03-01",
"--db",
"data/fred.db",
"--output",
str(out_file),
]
)
assert out_file.exists()