def test_ends_with_no_match(self): result = strutils.ends_with('ABC123', 'end') self.assertFalse(result)
def join_path(self, root_dir, file): if strutils.ends_with(root_dir, self.file_separator()): return root_dir + file else: return root_dir + self.file_separator() + file
def test_ends_with_match(self): result = strutils.ends_with('ABC123end', 'end') self.assertTrue(result)
def test_ends_with_none(self): result = strutils.ends_with(None, 'end') self.assertFalse(result)