'The runner emits a warning if it is using a result that doesn\'t
implement \'done\'.'

def test_reporterDeprecations(self):

    trialRunner = runner.TrialRunner(None)
    result = self.FakeReporter()
    trialRunner._makeResult = (lambda : result)
    def f():
        trialRunner.run(pyunit.TestCase('id'))
    f()
    warnings = self.flushWarnings([self.test_reporterDeprecations])
    self.assertEqual(warnings[0]['category'], DeprecationWarning)
    self.assertEqual(warnings[0]['message'], ("%s    should    implement    done()    but    doesn't.    Falling    back    to    printErrors()    and    friends." % reflect.qual(result.__class__)))
    self.assertTrue(__file__.startswith(warnings[0]['filename']))
    self.assertEqual(len(warnings), 1)
