Run doctests?


I’m guessing I’m missing something trivially obvious but haven’t found it–how can I run all doctests found in my code?

The Julia documentation references make -C doc doctest, but PkgDev.generate() does not create a makefile. The makefile for the Julia manual seems to run julia --color=yes docs/make.jl -- doctest, but as I understand Documenter, this requires manually adding each function to docs/src/

Is there a Julia equivalent to python test that runs all tests + doctests?

Many thanks!


I don’t know if there is a way to run a doctest without adding it to the docs. However you certainly don’t need to add each function manually, you can add everything automatically, see here.


This is a great tip, thank you! I’ve also made a feature request on the Juno github to add such a feature, here’s the link for anyone that’s interested: