Disable test not relevant for Python -builtin
This commit is contained in:
parent
af1093d956
commit
0fb34cb019
2 changed files with 12 additions and 2 deletions
|
|
@ -1,11 +1,16 @@
|
||||||
from python_append import *
|
from python_append import *
|
||||||
|
|
||||||
|
# test not relevant for -builtin
|
||||||
|
if is_python_builtin():
|
||||||
|
exit(0)
|
||||||
|
|
||||||
t=Test()
|
t=Test()
|
||||||
t.func()
|
t.func()
|
||||||
t.static_func()
|
t.static_func()
|
||||||
|
|
||||||
if grabpath() != os.path.dirname(mypath):
|
if grabpath() != os.path.dirname(mypath):
|
||||||
raise RuntimeError
|
raise RuntimeError("grabpath failed")
|
||||||
|
|
||||||
if grabstaticpath() != os.path.basename(mypath):
|
if grabstaticpath() != os.path.basename(mypath):
|
||||||
raise RuntimeError
|
raise RuntimeError("grabstaticpath failed")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,5 +46,10 @@ public:
|
||||||
void func() {};
|
void func() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef SWIGPYTHON_BUILTIN
|
||||||
|
bool is_python_builtin() { return true; }
|
||||||
|
#else
|
||||||
|
bool is_python_builtin() { return false; }
|
||||||
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue