diff --git a/conservancy_beancount/reports/fund.py b/conservancy_beancount/reports/fund.py index 71eaf69bcae2ec69630c9551b7e07c8774e170d6..f4dfaa6e27abdadb01cbd97a27ae0e1329b973e9 100644 --- a/conservancy_beancount/reports/fund.py +++ b/conservancy_beancount/reports/fund.py @@ -301,7 +301,7 @@ class TextReport: print(line_fmt.format('─' * acct_width, '─' * bal_width), file=self.out_file) bal_iter = iter(bal_seq) - print(line_fmt.format(acct_s, next(bal_iter)), file=self.out_file) + print(line_fmt.format(acct_s, next(bal_iter, "—")), file=self.out_file) for bal_s in bal_iter: print(line_fmt.format('', bal_s), file=self.out_file) if is_end_bal: diff --git a/setup.py b/setup.py index 0ca26c3305e8236533add54c0648018e8b1110f4..81a16dc5d246115f5882b34ec8de08b7d0338735 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name='conservancy_beancount', description="Plugin, library, and reports for reading Conservancy's books", - version='1.14.1', + version='1.14.2', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+', diff --git a/tests/test_reports_fund.py b/tests/test_reports_fund.py index fbcba40fc8f6f70d089286c80a864f42b0e59a5f..acaf27f9631bc47b095e1d6928900de960fea71b 100644 --- a/tests/test_reports_fund.py +++ b/tests/test_reports_fund.py @@ -296,6 +296,13 @@ def test_text_report(project, start_date, stop_date): assert retcode == 0 check_text_report(output, project, start_date, stop_date) +def test_text_report_empty_balances(): + retcode, output, errors = run_main(io.StringIO, [ + '-t', 'text', '-b', '2018-01-01', + ]) + assert not errors.getvalue() + assert retcode == 0 + @pytest.mark.parametrize('start_date,stop_date', [ (START_DATE, STOP_DATE), (MID_DATE, STOP_DATE),