

def testSimpleString(self):
    result = []
    d = self.term.expect('hello world', timeout=1, scheduler=self.fs)
    d.addCallback(result.append)
    self.term.write('greeting puny earthlings\n')
    self.failIf(result)
    self.term.write('hello world\n')
    self.failUnless(result)
    self.assertEqual(result[0].group(), 'hello world')
    self.assertEqual(len(self.fs.calls), 1)
    self.failIf(self.fs.calls[0].active())

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_helper.py ExpectTestCase.testSimpleString/original