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.
This commit is contained in:
parent
e668c47b70
commit
148bcab7a0
8 changed files with 171 additions and 244 deletions
|
|
@ -1,20 +1,19 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import doxygen_ignore
|
||||
import inspect
|
||||
import commentVerifier
|
||||
|
||||
commentVerifier.check(doxygen_ignore.func.__doc__,
|
||||
r"""
|
||||
A contrived example of ignoring too many commands in one comment.
|
||||
commentVerifier.check(inspect.getdoc(doxygen_ignore.func),
|
||||
"""\
|
||||
A contrived example of ignoring too many commands in one comment.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This is specific to **Python**.
|
||||
This is specific to **Python**.
|
||||
|
||||
|
||||
Command ignored, but anything here is still included.
|
||||
|
||||
""")
|
||||
Command ignored, but anything here is still included.""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue