def testRemoveSuffixes(self): no_clone = 'this.does.not.contain.clone' self.assertEquals(no_clone, patch_orderfile.RemoveSuffixes(no_clone)) with_clone = 'this.does.contain.clone.' self.assertEquals( 'this.does.contain', patch_orderfile.RemoveSuffixes(with_clone)) with_part = 'this.is.a.part.42' self.assertEquals( 'this.is.a', patch_orderfile.RemoveSuffixes(with_part))
def _IsSameMethod(name1, name2): """Returns true if name1 or name2 are split method forms of the other.""" return patch_orderfile.RemoveSuffixes(name1) == \ patch_orderfile.RemoveSuffixes(name2)