'If a before-phase trigger removes another before-phase trigger which
has not yet run, the removed trigger should not be run.'

def test_synchronousRemovePendingBefore(self):

    events = []
    self.event.addTrigger('before', (lambda : self.event.removeTrigger(beforeHandle)))
    beforeHandle = self.event.addTrigger('before', events.append, ('first', 'before'))
    self.event.addTrigger('before', events.append, ('second', 'before'))
    self.event.fireEvent()
    self.assertEqual(events, [('second', 'before')])
