[pypy-commit] pypy decimal-libmpdec: Hack differently, so that unicode.__new__ is analyzed even if previous tests already have loaded the module.

amauryfa noreply at buildbot.pypy.org
Sun Aug 24 22:27:47 CEST 2014


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: decimal-libmpdec
Changeset: r73049:82dc94208ca9
Date: 2014-08-24 19:57 +0200
http://bitbucket.org/pypy/pypy/changeset/82dc94208ca9/

Log:	Hack differently, so that unicode.__new__ is analyzed even if
	previous tests already have loaded the module.

diff --git a/pypy/module/_decimal/test/test_ztranslation.py b/pypy/module/_decimal/test/test_ztranslation.py
--- a/pypy/module/_decimal/test/test_ztranslation.py
+++ b/pypy/module/_decimal/test/test_ztranslation.py
@@ -1,9 +1,11 @@
 
 from pypy.objspace.fake.checkmodule import checkmodule
+from pypy.interpreter.mixedmodule import getinterpevalloader
 from pypy.module._decimal import Module
 
 def test_checkmodule():
-    Module.interpleveldefs['__hack'] = (
-        'interp_decimal.unicodeobject.W_UnicodeObject(u"")')
+    Module.buildloaders()
+    Module.loaders['__hack'] = getinterpevalloader(
+        'pypy.objspace.std', 'unicodeobject.W_UnicodeObject(u"")')
     checkmodule('_decimal')
 


More information about the pypy-commit mailing list