def testStrikeoutHyphenUnicode(self): s = u"нет-нет и да-да" f = Striker(s, 0) frags, next = f.apply() self.assertEqual(frags, []) self.assertEqual(next, 0)
def testStrikeout(self): s = u"abc -def- ghi" f = Striker(s, 0) frags, next = f.apply() self.assertTrue(u"".join(frags).startswith(u"abc <s>def</s>")) self.assertEqual(next, s.index(" g"))
def testStrikeoutHyphen(self): s = u"abc-def-ghi" f = Striker(s, 0) frags, next = f.apply() self.assertEqual(frags, []) self.assertEqual(next, 0)