def test_md5sum():
 tempdir = _TempDir()
 fname1 = op.join(tempdir, 'foo')
 fname2 = op.join(tempdir, 'bar')
 with open(fname1, 'wb') as fid:
  fid.write('abcd')
 with open(fname2, 'wb') as fid:
  fid.write('efgh')
 assert_equal(md5sum(fname1), md5sum(fname1, 1))
 assert_equal(md5sum(fname2), md5sum(fname2, 1024))
 assert_true((md5sum(fname1) != md5sum(fname2)))

def test_md5sum ( ) : tempdir = _TempDir ( ) fname1 = op . join ( tempdir , 'foo' ) fname2 = op . join ( tempdir , 'bar' ) with open ( fname1 , 'wb' ) as fid : fid . write ( 'abcd' ) with open ( fname2 , 'wb' ) as fid : fid . write ( 'efgh' ) assert_equal ( md5sum ( fname1 ) , md5sum ( fname1 , 1 ) ) assert_equal ( md5sum ( fname2 ) , md5sum ( fname2 , 1024 ) ) assert_true ( ( md5sum ( fname1 ) != md5sum ( fname2 ) ) )
test md5sum calculation .