

def testReset(self):
    tplt = 'Value boo (.*)\n\nStart\n  ^$boo -> Next.Record\n\nEOF\n'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    data = 'Matching text'
    result1 = t.ParseText(data)
    t.Reset()
    result2 = t.ParseText(data)
    self.failUnlessEqual(str(result1), str(result2))
    tplt = 'Value boo (one)\nValue hoo (two)\n\nStart\n  ^$boo -> State1\n\nState1\n  ^$hoo -> Start\n\nEOF'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    data = 'one'
    t.ParseText(data)
    t.Reset()
    self.failUnlessEqual(t._cur_state[0].match, '^$boo')
    self.failUnlessEqual(t._GetValue('boo').value, None)
    self.failUnlessEqual(t._GetValue('hoo').value, None)
    self.failUnlessEqual(data._result, [])

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testReset/VarMisuse@158/304 `t`->`data`