diff --git a/Examples/test-suite/python/python_append_runme.py b/Examples/test-suite/python/python_append_runme.py index 41cebad58..54d7a3e00 100644 --- a/Examples/test-suite/python/python_append_runme.py +++ b/Examples/test-suite/python/python_append_runme.py @@ -1,11 +1,16 @@ from python_append import * + +# test not relevant for -builtin +if is_python_builtin(): + exit(0) + t=Test() t.func() t.static_func() if grabpath() != os.path.dirname(mypath): - raise RuntimeError + raise RuntimeError("grabpath failed") if grabstaticpath() != os.path.basename(mypath): - raise RuntimeError + raise RuntimeError("grabstaticpath failed") diff --git a/Examples/test-suite/python_append.i b/Examples/test-suite/python_append.i index 0ac54656f..f37a6c199 100644 --- a/Examples/test-suite/python_append.i +++ b/Examples/test-suite/python_append.i @@ -46,5 +46,10 @@ public: void func() {}; }; +#ifdef SWIGPYTHON_BUILTIN +bool is_python_builtin() { return true; } +#else +bool is_python_builtin() { return false; } +#endif %}