diff --git a/Examples/test-suite/doxygen_parsing.i b/Examples/test-suite/doxygen_parsing.i index 21b51bc51..40f37a4c2 100644 --- a/Examples/test-suite/doxygen_parsing.i +++ b/Examples/test-suite/doxygen_parsing.i @@ -132,4 +132,9 @@ struct SomeAnotherStruct } }; +#ifdef SWIGPYTHON_BUILTIN +bool is_python_builtin() { return true; } +#else +bool is_python_builtin() { return false; } +#endif %} diff --git a/Examples/test-suite/python/doxygen_parsing_runme.py b/Examples/test-suite/python/doxygen_parsing_runme.py index f09f50761..80e8892fa 100644 --- a/Examples/test-suite/python/doxygen_parsing_runme.py +++ b/Examples/test-suite/python/doxygen_parsing_runme.py @@ -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.