Bypass Python tests not supported by -builtin
The base class is needed for the builtin class hierarchy, like many other languages
This commit is contained in:
parent
185d65895f
commit
ab79441151
3 changed files with 13 additions and 2 deletions
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
%import "import_nomodule.h"
|
||||
|
||||
#if !defined(SWIGJAVA) && !defined(SWIGRUBY) && !defined(SWIGCSHARP) && !defined(SWIGD)
|
||||
#if !defined(SWIGJAVA) && !defined(SWIGRUBY) && !defined(SWIGCSHARP) && !defined(SWIGD) && !defined(SWIGPYTHON_BUILTIN)
|
||||
|
||||
/**
|
||||
* The proxy class does not have Bar derived from Foo, yet an instance of Bar
|
||||
|
|
@ -40,3 +40,10 @@ class Bar : public Foo { };
|
|||
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
#ifdef SWIGPYTHON_BUILTIN
|
||||
bool is_python_builtin() { return true; }
|
||||
#else
|
||||
bool is_python_builtin() { return false; }
|
||||
#endif
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ C_TEST_CASES += \
|
|||
include $(srcdir)/../common.mk
|
||||
|
||||
BUILTIN_BROKEN = \
|
||||
import_nomodule.cpptest \
|
||||
python_abstractbase.cpptest \
|
||||
|
||||
BUILTIN_NOT_BROKEN = $(filter-out $(BUILTIN_BROKEN),$(NOT_BROKEN_TEST_CASES))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
from import_nomodule import *
|
||||
|
||||
# This test is expected to fail with -builtin option.
|
||||
# The base class is needed for the builtin class hierarchy
|
||||
if is_python_builtin():
|
||||
exit(0)
|
||||
|
||||
f = create_Foo()
|
||||
test1(f,42)
|
||||
delete_Foo(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue