'Assert that the path is a file and the files content ends with `tag`.'

def assertFileTag(self, path, tag):

    display_tag = tag
    tag = tag.encode('utf-8')
    self.assertTrue(os.path.isfile(path), u'{0}    is    not    a    file'.format(util.displayable_path(path)))
    with open(path, 'rb') as f:
        f.seek((- len(display_tag)), os.SEEK_END)
        self.assertEqual(f.read(), tag, u'{0}    is    not    tagged    with    {1}'.format(util.displayable_path(path), display_tag))
