예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
파일: pwid.py 프로젝트: yonglehou/zerodb
 def decode_wid(self):
     return widcode.decode(self.s)
예제 #4
0
 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])
예제 #5
0
 def get_words(self, docid):
     """Return a list of the wordids for a given docid."""
     return widcode.decode(self._docwords[docid])
예제 #6
0
파일: pwid.py 프로젝트: felixonmars/zerodb
 def decode_wid(self):
     return widcode.decode(self.s)
예제 #7
0
 def test_decode_zero(self):
     from zope.index.text.widcode import decode
     self.assertEqual(decode('\x80'), [0])
예제 #8
0
 def test_decode_zero(self):
     from zope.index.text.widcode import decode
     self.assertEqual(decode('\x80'), [0])
예제 #9
0
 def get_words(self, docid):
     """Return a list of the wordids for a given docid."""
     return widcode.decode(self._docwords[docid])