Author: Martin Matusiak <[email protected]>
Branch: py3.3-fixes3
Changeset: r72858:18c94a38e38e
Date: 2014-08-17 16:56 +0200
http://bitbucket.org/pypy/pypy/changeset/18c94a38e38e/
Log: add missing name attribute for MD5Type
diff --git a/pypy/module/_md5/interp_md5.py b/pypy/module/_md5/interp_md5.py
--- a/pypy/module/_md5/interp_md5.py
+++ b/pypy/module/_md5/interp_md5.py
@@ -52,6 +52,7 @@
copy = interp2app(W_MD5.copy_w),
digest_size = 16,
block_size = 64,
+ name = 'md5',
__doc__ = """md5(arg) -> return new md5 object.
If arg is present, the method call update(arg) is made.""")
diff --git a/pypy/module/_md5/test/test_md5.py
b/pypy/module/_md5/test/test_md5.py
--- a/pypy/module/_md5/test/test_md5.py
+++ b/pypy/module/_md5/test/test_md5.py
@@ -19,6 +19,12 @@
""")
+ def test_name(self):
+ """
+ md5.name should be 'md5'.
+ """
+ assert self.md5.md5().name == 'md5'
+
def test_digest_size(self):
"""
md5.digest_size should be 16.
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit