[pypy-commit] cffi default: py3 fix
arigo
noreply at buildbot.pypy.org
Thu May 28 20:32:03 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2126:74ed9d399694
Date: 2015-05-28 20:32 +0200
http://bitbucket.org/cffi/cffi/changeset/74ed9d399694/
Log: py3 fix
diff --git a/testing/cffi1/test_re_python.py b/testing/cffi1/test_re_python.py
--- a/testing/cffi1/test_re_python.py
+++ b/testing/cffi1/test_re_python.py
@@ -166,7 +166,7 @@
def test_global_const_nonint():
from re_python_pysrc import ffi
lib = ffi.dlopen(extmod)
- assert ffi.string(lib.globalconsthello, 8) == "hello"
+ assert ffi.string(lib.globalconsthello, 8) == b"hello"
py.test.raises(AttributeError, ffi.addressof, lib, 'globalconsthello')
def test_rtld_constants():
diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -880,7 +880,7 @@
# but we can get its address
p = ffi.addressof(lib, 'globvar')
assert ffi.typeof(p) == ffi.typeof('opaque_t *')
- assert ffi.string(ffi.cast("char *", p), 8) == "hello"
+ assert ffi.string(ffi.cast("char *", p), 8) == b"hello"
def test_constant_of_value_unknown_to_the_compiler():
extra_c_source = udir.join(
More information about the pypy-commit
mailing list