@@ -341,12 +341,30 @@ def test_fallback_on_zero_amount_postings(hook, test_pair, other_acct, value):
('Income:Donations', '-.1'),
('Expenses:BankingFees', '.1'),
(test_acct.name, 0, {meta_key: value}),
])
assert not list(hook.run(txn))
@pytest.mark.parametrize('test_acct', (
acct for acct in ACCOUNTS
if acct.name.startswith('Assets:')
and acct.required_types & PostType.CREDIT
))
def test_not_required_on_interest(hook, test_acct):
check(hook, test_acct, 'Income:Interest', None,
check_type=PostType.CREDIT)
and acct.required_types & PostType.DEBIT
def test_required_on_reverse_interest(hook, test_acct):
check(hook, test_acct, 'Income:Interest', {test_acct.missing_message()},
check_type=PostType.DEBIT)
@pytest.mark.parametrize('test_acct,equity_acct', testutil.combine_values(
ACCOUNTS,
testutil.OPENING_EQUITY_ACCOUNTS,
def test_not_required_on_opening(hook, test_acct, equity_acct):
check(hook, test_acct, equity_acct, None)