예제 #1
0
 def test_sha1sum(self):
     text = 'sha1 checksum test'
     hasher = hashlib.sha1()
     with NamedTemporaryFile(delete=False) as tf:
         write(tf, text)
         tf.flush()
         self.assertEqual(util.sha1sum(tf.name),
                          update_hasher(hasher, text).hexdigest())
         self.paths_to_delete.append(tf.name)
예제 #2
0
파일: maven.py 프로젝트: pombredanne/penchy
 def actual_checksum(self):
     """
     The actual checksum of this artifact. Will be computed and cached.
     """
     return sha1sum(self.filename)