diff --git a/tests/test_plugin.py b/tests/test_plugin.py index f722d3c..ba1a947 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -84,6 +84,8 @@ def test_registry_group_by_directive(group_str, expected): hook_groups = HOOK_REGISTRY.group_by_directive(*args) actual = {type(hook) for hook in hook_groups['Transaction']} assert actual.issuperset(expected) + if len(expected) == 1: + assert not (TransactionError in actual and PostingError in actual) def test_registry_unknown_group_name(): with pytest.raises(ValueError):