fab
fab copied to clipboard
Add doctest
To make sure that examples in the documentation actually work, we need to add support for doctest in the doc directory.
We don't have examples in docstrings at present, so it is not clear what using the doctest would add.
Not (only) docstrings, I wrote documentation, e.g. we should try to test in advanced_config.rst examples like:
A profile is defined as follows:
.. code-block::
:linenos:
tr = ToolRepository()
gfortran = tr.get_tool(Category.FORTRAN_COMPILER, "gfortran")
gfortran.define_profile("base")
gfortran.define_profile("fast-debug", inherit_from="base")
gfortran.define_profile("full-debug", inherit_from="fast-debug")
Not all might be possible of course, but making sure that the examples we have there actually work would be great.