示例#1
0
 def test_hash(self):
     size = os.stat(fname).st_size
     self.assertEqual(size, 12909756)
     hash = OpenSubtitles.hash_file(open(fname, 'rb'), size)
     self.assertEqual(hash, '8e245d9679d31e12')
示例#2
0
 def run(self):  
     with self._btfile.create_cursor() as c:
         filehash=OpenSubtitles.hash_file(c, self._btfile.size)  
         self.hash=filehash
         self._hash_cb(filehash)
示例#3
0
 def run(self):  
     with self._btfile.create_cursor() as c:
         filehash=OpenSubtitles.hash_file(c, self._btfile.size)  
         self.hash=filehash
         self._hash_cb(filehash)
示例#4
0
 def test_hash(self):
     size = os.stat(fname).st_size
     self.assertEqual(size, 12909756)
     hash=OpenSubtitles.hash_file(open(fname,'rb'), size)
     self.assertEqual(hash, '8e245d9679d31e12')