class TestSeparatorsRegexRule(object):#(unittest.TestCase): def setUp(self): self.rule = SeparatorsRegexRule([u'1, ', u'2, ', u'2 and ']) def test_apply(self): input = (u'L. Cabre1, J. Mancebo2, J. F. Solsona3, and the Bioethics ' 'Working Group of the SEMICYUC') result = self.rule.apply(input) self.failUnless(len(result) == 3)
class TestSeparatorsRegexRule(object): #(unittest.TestCase): def setUp(self): self.rule = SeparatorsRegexRule([u'1, ', u'2, ', u'2 and ']) def test_apply(self): input = (u'L. Cabre1, J. Mancebo2, J. F. Solsona3, and the Bioethics ' 'Working Group of the SEMICYUC') result = self.rule.apply(input) self.failUnless(len(result) == 3)
def setUp(self): self.rule = SeparatorsRegexRule([u'1, ', u'2, ', u'2 and '])