File diff 2b7c1acff47b → 1e09339b32f6
tests/test_config.py
Show inline comments
...
 
@@ -293,11 +293,22 @@ def test_relative_xdg_cache_home_ignored(tmp_path):
 
        cache_dir_path = config.cache_dir_path('TESTcache')
 
    assert cache_dir_path == tmp_path / '.cache/TESTcache'
 

	
 
def test_payment_threshold():
 
def test_default_payment_threshold():
 
    threshold = config_mod.Config().payment_threshold()
 
    assert threshold == 0
 
    assert isinstance(threshold, (int, decimal.Decimal))
 

	
 
@pytest.mark.parametrize('config_threshold', [
 
    '15',
 
    ' +15',
 
    '15. ',
 
    '15.0',
 
    '15.00',
 
])
 
def test_payment_threshold(config_threshold):
 
    config = config_mod.Config()
 
    config.load_string(f'[Beancount]\npayment threshold = {config_threshold}\n')
 
    assert config.payment_threshold() == decimal.Decimal(15)
 

	
 
@pytest.mark.parametrize('config_path', [
 
    None,
 
    '',