Sphinx has a doctest extension that we could make good use of (#13242 tried to) to improve our docs. We should install/run it, though we need to think about issues such as making sure this shards unittests properly and runs them early enough to be useful and not obnoxious.
cc @Mousius @driazati @gigiblender @leandron