[pypy-commit] pypy cffi_dlopen_unicode: add failing test
mattip
pypy.commits at gmail.com
Sun Oct 7 06:23:26 EDT 2018
Author: Matti Picus <matti.picus at gmail.com>
Branch: cffi_dlopen_unicode
Changeset: r95181:ec14b51b9207
Date: 2018-10-07 13:03 +0300
http://bitbucket.org/pypy/pypy/changeset/ec14b51b9207/
Log: add failing test
diff --git a/pypy/module/_cffi_backend/test/test_re_python.py b/pypy/module/_cffi_backend/test/test_re_python.py
--- a/pypy/module/_cffi_backend/test/test_re_python.py
+++ b/pypy/module/_cffi_backend/test/test_re_python.py
@@ -1,4 +1,5 @@
import py
+import shutil
from rpython.tool.udir import udir
from pypy.interpreter.gateway import interp2app
from pypy.module._cffi_backend.newtype import _clean_cache
@@ -40,6 +41,9 @@
'globalconst42', 'globalconsthello'])
outputfilename = ffiplatform.compile(str(tmpdir), ext)
cls.w_extmod = space.wrap(outputfilename)
+ outputfileUname = unicode(udir.join(u'load\u03betest.dll'))
+ shutil.copyfile(outputfilename, outputfileUname)
+ cls.w_extmodU = space.wrap(outputfileUname)
#mod.tmpdir = tmpdir
#
ffi = FFI()
@@ -108,6 +112,13 @@
assert lib.add42(-10) == 32
assert type(lib.add42) is _cffi_backend.FFI.CData
+ def test_dlopen_unicode(self):
+ import _cffi_backend
+ self.fix_path()
+ from re_python_pysrc import ffi
+ lib = ffi.dlopen(self.extmodU)
+ assert lib.add42(-10) == 32
+
def test_dlclose(self):
import _cffi_backend
self.fix_path()
More information about the pypy-commit
mailing list