@defer.inlineCallbacks
    def test_process_chain(self):
        x = yield process_chain([cb1, cb2, cb3], 'res', 'v1', 'v2')
        self.assertEqual(x, "(cb3 (cb2 (cb1 res v1 v2) v1 v2) v1 v2)")

        gotexc = False
        try:
            yield process_chain([cb1, cb_fail, cb3], 'res', 'v1', 'v2')
        except __HOLE__ as e:
            gotexc = True
        self.assertTrue(gotexc)
dataset/ETHPy150Open scrapy/scrapy/tests/test_utils_defer.py/DeferUtilsTest.test_process_chain