swig/Examples/test-suite/python/doxygen_ignore_runme.py
Vadim Zeitlin 148bcab7a0 Switch Python Doxygen unit tests to use inspect.getdoc()
Using the standard inspect module instead of accessing __doc__ directly allows
the tests to pass both when using and not using -builtin, as whitespace-only
differences between the docstrings don't matter then because inspect.getdoc()
removes the indentation and the leading and trailing spaces.

This is similar to what had been already done for python_docstring unit test
in fa282b3540.
2016-12-12 01:26:05 +01:00

19 lines
312 B
Python

#!/usr/bin/python
import doxygen_ignore
import inspect
import commentVerifier
commentVerifier.check(inspect.getdoc(doxygen_ignore.func),
"""\
A contrived example of ignoring too many commands in one comment.
This is specific to **Python**.
Command ignored, but anything here is still included.""")