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,14 +1,14 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import doxygen_translate_links
|
||||
import inspect
|
||||
import string
|
||||
import sys
|
||||
import commentVerifier
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_translate_links.function.__doc__,
|
||||
r"""
|
||||
Testing typenames converting in @ link
|
||||
commentVerifier.check(inspect.getdoc(doxygen_translate_links.function),
|
||||
r"""Testing typenames converting in @ link
|
||||
|
||||
superFunc(int,std::string)
|
||||
Test for std_string member
|
||||
|
|
@ -37,5 +37,4 @@ some failing params:
|
|||
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
See also: superFunc()
|
||||
""")
|
||||
See also: superFunc()""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue