

def testImplicitDefaultRules(self):
    for line in ('  ^A beer called ${beer} -> Record End', '  ^A beer called ${beer} -> End', '  ^A beer called ${beer} -> Next.NoRecord End', '  ^A beer called ${beer} -> Clear End', '  ^A beer called ${beer} -> Error "Hello World"'):
        r = textfsm.TextFSMRule(line)
        self.failUnlessEqual(str(r), line)
    for line in ('  ^A beer called ${beer} -> Next "Hello World"', '  ^A beer called ${beer} -> Record.Next', '  ^A beer called ${beer} -> Continue End', '  ^A beer called ${beer} -> Beer End'):
        self.failUnlessRaises(textfsm.TextFSMTemplateError, textfsm.TextFSMRule, line)

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testImplicitDefaultRules/original