'If several warnings are emitted by a test, C{flushWarnings} returns a
list containing all of them.'

def test_several(self):

    firstMessage = 'first    warning    message'
    firstCategory = UserWarning
    warnings.warn(message=firstMessage, category=firstCategory)
    secondMessage = 'second    warning    message'
    secondCategory = RuntimeWarning
    warnings.warn(message=secondMessage, category=secondCategory)
    self.assertDictSubsets(self.flushWarnings(), [{'category': firstCategory, 'message': firstMessage}, {'category': secondCategory, 'message': secondMessage}])
