summaryrefslogtreecommitdiff
path: root/testing/embedding/test_basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/embedding/test_basic.py')
-rw-r--r--testing/embedding/test_basic.py13
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"