def test_calc_overlap(self): tests = """ howdy dyno 2 howdyno russell grsdturuss 4 grsdturussell sweet adkfjdswe 3 adkfjdsweet fooling inglinz 3 foolinglinz foozballing ball 4 foozballing """.strip().splitlines() tests = map(lambda x: x.split(), tests) for t in tests: self.assertEquals(davyncy.calc_overlap(t[0],t[1]),(int(t[2]),t[3]))
def test_calc_overlap2(self): t1 = "ity, she ran across the field\n\nafter it, and fortunately was just in ti" t2 =" iosity, she ran across the field\n\nafter it, and fortunately was just in tim" self.assertEquals(davyncy.calc_overlap(t1,t2)[0], 71)