From 6aa63b08263172a979012747497f4207cc341bb0 Mon Sep 17 00:00:00 2001 From: Lucia Li Date: Mon, 8 Nov 2021 21:45:14 +0800 Subject: Upgrade cffi from 1.12.2 to 1.15.0 Source is fetched from https://foss.heptapod.net/pypy/cffi/-/archive/branch/release-1.15/cffi-branch-release-1.15.zip Build cffi manually and update Android.bp Bug: 205265538 Test: None Change-Id: I91a5ed3b96029b3988602aba6a00c0e0748d0600 --- testing/embedding/test_basic.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'testing/embedding/test_basic.py') diff --git a/testing/embedding/test_basic.py b/testing/embedding/test_basic.py index 8463c3f..8d2e776 100644 --- a/testing/embedding/test_basic.py +++ b/testing/embedding/test_basic.py @@ -63,8 +63,8 @@ class EmbeddingTests: output = popen.stdout.read() err = popen.wait() if err: - raise OSError("popen failed with exit code %r: %r" % ( - err, args)) + raise OSError(("popen failed with exit code %r: %r\n\n%s" % ( + err, args, output)).rstrip()) print(output.rstrip()) return output @@ -172,7 +172,8 @@ if sys.platform == 'win32': result = popen.stdout.read() err = popen.wait() if err: - raise OSError("%r failed with exit code %r" % (name, err)) + raise OSError("%r failed with exit code %r" % ( + os.path.join(path, executable_name), err)) return result @@ -205,3 +206,9 @@ class TestBasic(EmbeddingTests): self.compile('add1-test', [initerror_cffi]) output = self.execute('add1-test') assert output == "got: 0 0\n" # plus lots of info to stderr + + def test_embedding_with_unicode(self): + withunicode_cffi = self.prepare_module('withunicode') + self.compile('add1-test', [withunicode_cffi]) + output = self.execute('add1-test') + assert output == "255\n4660\n65244\ngot: 0 0\n" -- cgit v1.2.3