def testSimplestIntervening(self): f_list = find_intervening_fragments('short', ['long']) self.assertEqual(f_list, None) f_list = find_intervening_fragments('short', ['short']) self.assertEqual(f_list, [['', '']]) f_list = find_intervening_fragments('ashortb', ['short']) self.assertEqual(f_list, [['a', 'b']])
def testRepIntervening(self): f_list = find_intervening_fragments('abcbedf', ['b', 'd']) self.assertEqual(len(f_list), 2) self.assertEqual(f_list[0], ['a', 'cbe', 'f']) self.assertEqual(f_list[1], ['abc', 'e', 'f'])
def testIntervening(self): f_list = find_intervening_fragments('abcde', ['b', 'd']) self.assertEqual(len(f_list), 1) self.assertEqual(f_list[0], ['a', 'c', 'e'])