

def testMultiple(self):
    result = []
    d1 = self.term.expect('hello ')
    d1.addCallback(result.append)
    d2 = self.term.expect('world')
    d2.addCallback(result.append)
    self.failIf(result)
    self.term.write('hello')
    self.failIf(result)
    self.term.write(' ')
    self.assertEqual(len(result), 1)
    self.term.write('world')
    self.assertEqual(len(result), 2)
    d2.assertEqual(result[0].group(), 'hello ')
    self.assertEqual(result[1].group(), 'world')

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_helper.py ExpectTestCase.testMultiple/VarMisuse@120/140 `self`->`d2`