diff options
author | Lucia Li <luciali@google.com> | 2021-11-08 21:45:14 +0800 |
---|---|---|
committer | Lucia Li <luciali@google.com> | 2021-11-09 11:01:46 +0800 |
commit | 6aa63b08263172a979012747497f4207cc341bb0 (patch) | |
tree | 64f8c90740adbe25c30379d6567fd2acafcbd2dd /testing/embedding/test_basic.py | |
parent | 3e013ad5e4325c9a301ddde47e997bfd797167cd (diff) | |
download | cffi-6aa63b08263172a979012747497f4207cc341bb0.tar.gz |
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
Diffstat (limited to 'testing/embedding/test_basic.py')
-rw-r--r-- | testing/embedding/test_basic.py | 13 |
1 files changed, 10 insertions, 3 deletions
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" |