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')
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)
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')