'Any warnings emitted by a test which are not flushed are emitted to the
Python warning system.'

def test_unflushed(self):

    result = TestResult()
    case = Mask.MockTests('test_unflushed')
    case.run(result)
    warningsShown = self.flushWarnings([Mask.MockTests.test_unflushed])
    self.assertEqual(warningsShown[0]['message'], 'some    warning    text')
    self.assertIdentical(warningsShown[0]['category'], UserWarning)
    where = type(case).test_unflushed.__code__
    filename = where.co_filename
    lineno = (where.co_firstlineno + 4)
    self.assertEqual(warningsShown[0]['filename'], filename)
    self.assertEqual(warningsShown[0]['lineno'], lineno)
    self.assertEqual(len(warningsShown), 1)
