Changeset - 51137815d304
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-04-21 13:07:14
brettcsmith@brettcsmith.org
config: fiscal_year_begin returns a FiscalYear.
2 files changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/config.py
Show inline comments
...
 
@@ -35,2 +35,3 @@ from typing import (
 

	
 
from . import books
 
from . import rtutil
...
 
@@ -132,3 +133,3 @@ class Config:
 

	
 
    def fiscal_year_begin(self) -> Tuple[int, int]:
 
    def fiscal_year_begin(self) -> books.FiscalYear:
 
        s = self.file_config.get('Beancount', 'fiscal year begin', fallback='3 1')
...
 
@@ -148,3 +149,3 @@ class Config:
 
        else:
 
            return (month, day)
 
            return books.FiscalYear(month, day)
 

	
tests/test_config.py
Show inline comments
...
 
@@ -380,2 +380,4 @@ def test_default_fiscal_year_begin():
 
    config = config_mod.Config()
 
    assert config.fiscal_year_begin() == (3, 1)
 
    actual = config.fiscal_year_begin()
 
    assert actual.month == 3
 
    assert actual.day == 1
0 comments (0 inline, 0 general)