Better detection of builtin in Python testcase

This commit is contained in:
William S Fulton 2018-08-14 19:16:25 +01:00
parent 345b4fec43
commit bb5c46079b
2 changed files with 6 additions and 1 deletions

View File

@ -132,4 +132,9 @@ struct SomeAnotherStruct
}
};
#ifdef SWIGPYTHON_BUILTIN
bool is_python_builtin() { return true; }
#else
bool is_python_builtin() { return false; }
#endif
%}

View File

@ -17,7 +17,7 @@ comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeAnotherClass),
# There doesn't seem to be any way to specify the doc string for __init__ when
# using "-builtin" (see http://stackoverflow.com/q/11913492/15275), so skip
# this test in this case.
if str(os.environ.get('SWIG_FEATURES')).find('-builtin') == -1:
if not doxygen_parsing.is_python_builtin():
comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeAnotherClass.__init__),
r"""*Overload 1:*
First overloaded constructor.