summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-08-11 09:12:21 +0100
committerSimon McVittie <smcv@debian.org>2016-08-11 09:24:22 +0100
commit6e9d32883ef51b3c8e72b200caf9e105627b7c62 (patch)
treecdedb1b9878fb5043d31d5baa10d8e9038fdf5f9 /test
parenta66cc5f91380fbeffcff2b25981d035a53d93cac (diff)
import-repeatedly: detect exceptions
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'test')
-rw-r--r--test/import-repeatedly.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/import-repeatedly.c b/test/import-repeatedly.c
index a8b8834..2df82e9 100644
--- a/test/import-repeatedly.c
+++ b/test/import-repeatedly.c
@@ -12,7 +12,10 @@ int main(void)
for (i = 0; i < 100; ++i) {
Py_Initialize();
- PyRun_SimpleString("import dbus\n");
+ if (PyRun_SimpleString("import dbus\n") != 0) {
+ puts("not ok 1 - there was an exception");
+ return 1;
+ }
Py_Finalize();
}