Disable test not relevant for Python -builtin

This commit is contained in:
William S Fulton 2014-10-01 07:57:23 +01:00
commit 0fb34cb019
2 changed files with 12 additions and 2 deletions

View file

@ -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")

View file

@ -46,5 +46,10 @@ public:
void func() {};
};
#ifdef SWIGPYTHON_BUILTIN
bool is_python_builtin() { return true; }
#else
bool is_python_builtin() { return false; }
#endif
%}