def METHOD_NAME(event_manager):
    """Test the transaction context manager with errors."""
    with pytest.raises(TypeError, match="transaction error"):
        with Transaction(event_manager):
            raise TypeError("transaction error")