[pypy-svn] r77968 - pypy/branch/fast-forward/pypy/module/_hashlib/test

afa at codespeak.net afa at codespeak.net
Fri Oct 15 10:45:33 CEST 2010


Author: afa
Date: Fri Oct 15 10:45:31 2010
New Revision: 77968

Modified:
   pypy/branch/fast-forward/pypy/module/_hashlib/test/test_hashlib.py
Log:
Avoid __name mangling when running tests with -A


Modified: pypy/branch/fast-forward/pypy/module/_hashlib/test/test_hashlib.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/_hashlib/test/test_hashlib.py	(original)
+++ pypy/branch/fast-forward/pypy/module/_hashlib/test/test_hashlib.py	Fri Oct 15 10:45:31 2010
@@ -38,7 +38,8 @@
             c_hexdigest = hexdigest
 
             # also test the pure Python implementation
-            h = hashlib.__get_builtin_constructor(name)('')
+            py_new = getattr(hashlib, '__get_builtin_constructor')
+            h = py_new(name)('')
             assert h.digest_size == expected_size
             assert h.digestsize == expected_size
             #



More information about the Pypy-commit mailing list