title: Sphinx doctest vs autodoc
body: <p>I am seemingly unable to make the Sphinx autodoc and doctest extensions play nicely together.</p>
  
  <p>I have a doctested Python project in which the docstrings are working just fine. That is, calling <code>doctest.testmod()</code> on my modules and submodules works well.</p>
  
  <p>In the Sphinx documentation of the project, I am using the <code>ext.autodoc</code> extension and the <code>automodule</code> directive to automatically import the modules' documentation into the <code>.rst</code> documents for each module.</p>
  
  <p>I wanted to start using the <code>ext.doctest</code> Sphinx extension to write some user documentation and tutorials, and to have them automatically checked for correctness. However, the problem is that apparently the doctest extension parses the docstrings from the <code>automodule</code>d docs, tries to run them and fails (a lot of errors about being unable to find the types referred in the docstrings, and other problems like this).</p>
  
  <p>I don't really want <code>ext.doctest</code> to run the doctests from the Python code (they are already run as part of the test suite). Is there a way to tell Sphinx <strong>not</strong> to try running doctests appearing in certain files?</p>