This was reported to me a few days ago, but I didn't understand it at first: JuliaAstro/Spectra.jl#38 (comment). But today I ran into the same issue myself: NumericalEarth/Breeze.jl#95 (comment). As far as I understand, due to the module inside which tests are evaluated inside ParallelTestRunner, Documenter's doctests may fail if the output somehow depends on the scope of the Main module?(???) A workaround is to do something like
@eval Main using MyPackage
using Documenter: DocMeta, doctest
DocMeta.setdocmeta!(Main.MyPackage, :DocTestSetup, :(using MyPackage); recursive = true)
doctest(Main.MyPackage)
but I wonder if ParallelTestRunner can do something to make this unnecessary, or at least should document this module behaviour.