def text_assert(self, anchor, byte=False):

        if not self.text_search(anchor, byte=byte):
            raise DataNotFound(u'Substring not found: %s' % anchor)
If `anchor` is not found then raise `DataNotFound` exception.
dataset/ETHPy150Open lorien/grab/grab/document.py/TextExtension.text_assert