File diff 96a363633f5e → 3000aeee0918
tests/test_config.py
Show inline comments
...
 
@@ -381,3 +381,14 @@ def test_default_fiscal_year_begin():
 
    actual = config.fiscal_year_begin()
 
    assert actual.month == 3
 
    assert actual.day == 1
 

	
 
def test_books_loader():
 
    books_path = testutil.test_path('bookstest')
 
    config = config_mod.Config()
 
    config.load_string(f'[Beancount]\nbooks dir = {books_path}\n')
 
    loader = config.books_loader()
 
    expected = 'include "{}"'.format(books_path / 'books/2020.beancount')
 
    assert loader.fy_range_string(0, 2020, {}) == expected
 

	
 
def test_books_loader_without_books():
 
    assert config_mod.Config().books_loader() is None