diff options
author | Simon McVittie <smcv@debian.org> | 2016-08-11 09:58:58 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-08-11 09:58:58 +0100 |
commit | 1013581fef91c9be087d6264084cec34c2ca6e9a (patch) | |
tree | b8faa41a8779681833535a017fee1730263a5112 /test | |
parent | 6e9d32883ef51b3c8e72b200caf9e105627b7c62 (diff) |
test/import-repeatedly: skip on Python 3.6 for now
This is a workaround for <http://bugs.python.org/issue27736>.
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/import-repeatedly.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/import-repeatedly.c b/test/import-repeatedly.c index 2df82e9..db74f05 100644 --- a/test/import-repeatedly.c +++ b/test/import-repeatedly.c @@ -1,6 +1,7 @@ /* Regression test for https://bugs.freedesktop.org/show_bug.cgi?id=23831 */ #include <stdio.h> +#include <string.h> #include <Python.h> @@ -12,10 +13,20 @@ int main(void) for (i = 0; i < 100; ++i) { Py_Initialize(); + if (PyRun_SimpleString("import dbus\n") != 0) { puts("not ok 1 - there was an exception"); return 1; } + + /* This is known not to work in Python 3.6.0a3, for reasons that + * are not a dbus-python bug. */ + if (strcmp(Py_GetVersion(), "3.6") >= 0) { + puts("ok 1 # SKIP - http://bugs.python.org/issue27736"); + Py_Finalize(); + return 0; + } + Py_Finalize(); } |