JuliaDocs / Documenter.jl

A documentation generator for Julia.
https://documenter.juliadocs.org
MIT License
818 stars 480 forks source link

`doctest()` should not interfere with `@testset` in `jldoctest` #2605

Open fingolfin opened 3 days ago

fingolfin commented 3 days ago

For various reasons we have a jldoctest that includes @testset (indirectly).

Unfortunately that causes pain because this has some output. We run the doctests twice in our CI (in different places): once when building the manual; and once via an explicit call to doctest.

In one case, apparently Documenter wraps the jldoctest content into a @testset of its own. As a result, our @testset does not output anything. In the other case, this outer @testset seems to be absent, and we do get output.

It would have been much simpler if both cases behaved the same. Even better was if they both did not interfere with the @testset in the doctest so that it behaves "as it would in the REPL"

fingolfin commented 3 days ago

Actually this may be as simple as changing Documenters top-level @testset to use verbose=true. But of course that should be tested (and tests written etc.)