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.
19 lines
312 B
Python
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.""")
|