Skip doctests included with autodoc

18 views
Skip to first unread message

Jens Jørgen Mortensen

unread,
Jun 3, 2020, 4:10:40 AM6/3/20
to sphinx...@googlegroups.com
Hi!

I'm using the sphinx.ext.doctest extension to test code examples in my
docs. I'm using the default behavior where code marked with ">>>" is
tested, which is nice because I don't have to put my code examples
inside a ".. doctest::" directive. But this will also test my doctests
pulled in (via autodoc) from my actual code. Is there a way to avoid
that? Those doctests are already tested outside Sphinx.

Best,
Jens Jørgen

Komiya Takeshi

unread,
Jun 3, 2020, 9:20:52 AM6/3/20
to sphinx...@googlegroups.com
Hi,

Unfortunately, there are no such options. I think it is hard to
distinguish code blocks in reST or docstring.

Thanks,
Takeshi KOMIYA

2020年6月3日(水) 17:10 'Jens Jørgen Mortensen' via sphinx-users
<sphinx...@googlegroups.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/56d65bae-2987-fd60-fff5-a1bc60afb5a4%40dtu.dk.

Jens Jørgen Mortensen

unread,
Jun 4, 2020, 2:11:02 AM6/4/20
to sphinx...@googlegroups.com, Komiya Takeshi
Den 03.06.2020 kl. 15.20 skrev Komiya Takeshi:
> Hi,
>
> Unfortunately, there are no such options. I think it is hard to
> distinguish code blocks in reST or docstring.

Makes sense. Thanks for your quick answer.

Jens Jørgen
Reply all
Reply to author
Forward
0 new messages