[pypy-svn] r64356 - in pypy/trunk/pypy/module: md5/test sha sha/test
arigo at codespeak.net
arigo at codespeak.net
Sun Apr 19 13:18:34 CEST 2009
Author: arigo
Date: Sun Apr 19 13:18:34 2009
New Revision: 64356
Modified:
pypy/trunk/pypy/module/md5/test/test_md5.py
pypy/trunk/pypy/module/sha/interp_sha.py
pypy/trunk/pypy/module/sha/test/test_sha.py
Log:
More whacking.
Modified: pypy/trunk/pypy/module/md5/test/test_md5.py
==============================================================================
--- pypy/trunk/pypy/module/md5/test/test_md5.py (original)
+++ pypy/trunk/pypy/module/md5/test/test_md5.py Sun Apr 19 13:18:34 2009
@@ -38,11 +38,11 @@
"""
md5 = self.md5
d = md5.md5()
- if hasattr(md5, 'MD5Type'): # not on CPython 2.5
- assert isinstance(d, md5.MD5Type)
+ if not hasattr(md5, 'MD5Type'):
+ skip("no md5.MD5Type on CPython")
+ assert isinstance(d, md5.MD5Type)
d = md5.new()
- if hasattr(md5, 'MD5Type'): # not on CPython 2.5
- assert isinstance(d, md5.MD5Type)
+ assert isinstance(d, md5.MD5Type)
def test_md5object(self):
Modified: pypy/trunk/pypy/module/sha/interp_sha.py
==============================================================================
--- pypy/trunk/pypy/module/sha/interp_sha.py (original)
+++ pypy/trunk/pypy/module/sha/interp_sha.py Sun Apr 19 13:18:34 2009
@@ -48,6 +48,7 @@
hexdigest = interp2app(W_SHA.hexdigest_w, unwrap_spec=['self']),
copy = interp2app(W_SHA.copy_w, unwrap_spec=['self']),
digest_size = 20,
+ digestsize = 20,
__doc__ = """sha(arg) -> return new sha object.
If arg is present, the method call update(arg) is made.""")
Modified: pypy/trunk/pypy/module/sha/test/test_sha.py
==============================================================================
--- pypy/trunk/pypy/module/sha/test/test_sha.py (original)
+++ pypy/trunk/pypy/module/sha/test/test_sha.py Sun Apr 19 13:18:34 2009
@@ -29,6 +29,7 @@
assert self.sha.digestsize == 20
d = self.sha.sha()
assert d.digest_size == 20
+ assert d.digestsize == 20
def test_SHAType(self):
More information about the Pypy-commit
mailing list