def test_callablesCalledInOrder(self):
        log = []
        deferreds = []

        def append(value):
            d = defer.Deferred()
            log.append(value)
            deferreds.append(d)
            return d

        d = util._runSequentially([lambda: append('foo'),
                                   lambda: append('bar')])

        # runSequentially should wait until the Deferred has fired before
        # running the second callable.
        self.assertEqual(log, ['foo'])
        deferreds[-1].callback(None)
        self.assertEqual(log, ['foo', 'bar'])

        # Because returning created Deferreds makes jml happy.
        deferreds[-1].callback(None)
        return d
Extract key and value from key=val string.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_util.py/TestRunSequentially.test_callablesCalledInOrder--crossover with--dataset/ETHPy150Open saltstack/salt/salt/pillar/svn_pillar.py/_extract_key_val