Bypass Python tests not supported by -builtin
The old static syntax (e.g., dc.new_A() rather than dc.A()) is not supported with -builtin
This commit is contained in:
parent
9f1b051c16
commit
afcd61388a
3 changed files with 11 additions and 4 deletions
|
|
@ -168,5 +168,11 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
#ifdef SWIGPYTHON_BUILTIN
|
||||||
|
bool is_python_builtin() { return true; }
|
||||||
|
#else
|
||||||
|
bool is_python_builtin() { return false; }
|
||||||
|
#endif
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,6 @@ include $(srcdir)/../common.mk
|
||||||
|
|
||||||
BUILTIN_BROKEN = \
|
BUILTIN_BROKEN = \
|
||||||
autodoc.cpptest \
|
autodoc.cpptest \
|
||||||
default_constructor.cpptest \
|
|
||||||
import_nomodule.cpptest \
|
import_nomodule.cpptest \
|
||||||
python_abstractbase.cpptest \
|
python_abstractbase.cpptest \
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
import _default_constructor
|
||||||
|
|
||||||
# This test is expected to fail with -builtin option.
|
# This test is expected to fail with -builtin option.
|
||||||
# It uses the old static syntax (e.g., dc.new_A() rather than dc.A()),
|
# It uses the old static syntax (e.g., dc.new_A() rather than dc.A()),
|
||||||
# which is not provided with the -builtin option.
|
# which is not provided with the -builtin option.
|
||||||
|
if _default_constructor.is_python_builtin():
|
||||||
import _default_constructor
|
exit(0)
|
||||||
|
|
||||||
dc = _default_constructor
|
dc = _default_constructor
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue