

def assertMistakenMethodWarning(self, resultList):
    "\n        Flush the current warnings and assert that we have been told that\n        C{mistakenMethod} was invoked, and that the result from the Deferred\n        that was fired (appended to the given list) is C{mistakenMethod}'s\n        result.  The warning should indicate that an inlineCallbacks function\n        called 'inline' was made to exit.\n        "
    self.assertEqual(resultList, [1])
    warnings = self.flushWarnings(offendingFunctions=[self.mistakenMethod])
    self.assertEqual(len(warnings), 1)
    self.assertEquals(warnings[0]['category'], DeprecationWarning)
    self.assertEquals(resultList[0]['message'], "returnValue() in 'mistakenMethod' causing 'inline' to exit: returnValue should only be invoked by functions decorated with inlineCallbacks")

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/internet/test/inlinecb_tests.py NonLocalExitTests.assertMistakenMethodWarning/VarMisuse@71/223 `warnings`->`resultList`