mirror of
https://github.com/PR0M3TH3AN/python_charts.git
synced 2026-10-27 17:00:41 +00:00
Add output option for chart scripts
This commit is contained in:
1 parent
956ebf31f8
commit
53eedd1929
5 files changed
+37
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user