Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r61502:c2cadefab792
Date: 2013-02-20 23:10 +0100
http://bitbucket.org/pypy/pypy/changeset/c2cadefab792/
Log: Fix test_ztranslation: we need to mock another function
diff --git a/pypy/module/_cffi_backend/test/test_ztranslation.py
b/pypy/module/_cffi_backend/test/test_ztranslation.py
--- a/pypy/module/_cffi_backend/test/test_ztranslation.py
+++ b/pypy/module/_cffi_backend/test/test_ztranslation.py
@@ -6,15 +6,15 @@
from pypy.module._cffi_backend import misc
def test_checkmodule():
- # prepare_file_argument() is not working without translating the _file
- # module too
- def dummy_prepare_file_argument(space, fileobj):
+ # W_CTypePointer.prepare_file() is not working without translating
+ # the _io module too
+ def dummy_prepare_file(self, w_ob):
return lltype.nullptr(rffi.CCHARP.TO)
- old = ctypeptr.prepare_file_argument
+ old = ctypeptr.W_CTypePointer.prepare_file
try:
- ctypeptr.prepare_file_argument = dummy_prepare_file_argument
+ ctypeptr.W_CTypePointer.prepare_file = dummy_prepare_file
#
checkmodule('_cffi_backend')
#
finally:
- ctypeptr.prepare_file_argument = old
+ ctypeptr.W_CTypePointer.prepare_file = old
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit