def test_symmetric(self): from zope.index.text.widcode import decode from zope.index.text.widcode import encode for wid in range(2**28, 1117): wids = [wid] code = encode(wids) self.assertEqual(decode(code), wids)
def test_symmetric(self): from zope.index.text.widcode import decode from zope.index.text.widcode import encode for wid in xrange(2**28, 1117): wids = [wid] code = encode(wids) self.assertEqual(decode(code), wids)
def decode_wid(self): return widcode.decode(self.s)
def get_words(self, docid): """Return a list of the wordids for a given docid.""" # Note this is overridden in the instance return widcode.decode(self._docwords[docid])
def get_words(self, docid): """Return a list of the wordids for a given docid.""" return widcode.decode(self._docwords[docid])
def test_decode_zero(self): from zope.index.text.widcode import decode self.assertEqual(decode('\x80'), [0])