From 8316f08aec9b1a99cd1819f087f28bda22024c01 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 15 Dec 2014 14:05:15 +0100 Subject: [PATCH] Fix Doxygen unit test in Python "-builtin" case. Unfortunately there doesn't seem to be any way to use docstrings for __init__ methods when using "-builtin", so just disable this particular test then. --- Examples/test-suite/python/doxygen_parsing_runme.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Examples/test-suite/python/doxygen_parsing_runme.py b/Examples/test-suite/python/doxygen_parsing_runme.py index d89a1741a..883fbd83b 100644 --- a/Examples/test-suite/python/doxygen_parsing_runme.py +++ b/Examples/test-suite/python/doxygen_parsing_runme.py @@ -2,6 +2,7 @@ import doxygen_parsing import string +import os import sys import commentVerifier @@ -14,7 +15,12 @@ The class comment""") commentVerifier.check(doxygen_parsing.SomeStruct.__doc__, r""" The struct comment""") -commentVerifier.check(doxygen_parsing.SomeAnotherClass.__init__.__doc__, + +# 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: + commentVerifier.check(doxygen_parsing.SomeAnotherClass.__init__.__doc__, r""" *Overload 1:* First overloaded constructor. @@ -22,6 +28,7 @@ commentVerifier.check(doxygen_parsing.SomeAnotherClass.__init__.__doc__, *Overload 2:* Second overloaded constructor.""") + commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethod.__doc__, r""" The class method comment.