[pypy-svn] r9304 - pypy/dist/pypy/lib/test2
tismer at codespeak.net
tismer at codespeak.net
Fri Feb 18 13:28:48 CET 2005
Author: tismer
Date: Fri Feb 18 13:28:48 2005
New Revision: 9304
Modified:
pypy/dist/pypy/lib/test2/test_md5.py
Log:
fixed the md5 test. This failed since appspace is no longer importable.
XXX how do we handle this in general?
Modified: pypy/dist/pypy/lib/test2/test_md5.py
==============================================================================
--- pypy/dist/pypy/lib/test2/test_md5.py (original)
+++ pypy/dist/pypy/lib/test2/test_md5.py Fri Feb 18 13:28:48 2005
@@ -7,8 +7,16 @@
import autopath
import string, unittest
import md5 # CPython's implementation in C.
-from pypy.appspace import md5 as pymd5 # The pure Python implementation.
-
+# since appspace is gone, we cannot test this way any longer:
+#from pypy.appspace import md5 as pymd5 # The pure Python implementation.
+# instead, we fake a module.
+# XXX think of a better wayto do this
+import os, new
+# fake import of the python module which we cannot see
+import pypy
+fname = os.path.join(pypy.__path__[0], 'lib', 'md5.py')
+pymd5 = new.module('pymd5')
+exec file(fname).read() in pymd5.__dict__
# Helpers...
More information about the Pypy-commit
mailing list