Run doctests?


#1

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/index.md.

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

Many thanks!


#2

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.


#3

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: https://github.com/JunoLab/atom-julia-client/issues/401