#374: Make the `doctest_path` config value of the doctest extension actually work -- it was used after all tests were run.

This commit is contained in:
Georg Brandl 2010-04-06 13:22:52 +02:00
parent 0ca72d4199
commit dea29d0f11
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
Release 0.6.6 (in development)
==============================
* #374: Make the ``doctest_path`` config value of the doctest
extension actually work.
* Fix the handling of multiple toctrees when creating the global
TOC for the ``toctree()`` template function.

View File

@ -196,6 +196,8 @@ class DocTestBuilder(Builder):
# that code nevertheless, we monkey-patch the "compile" it uses.
doctest.compile = self.compile
sys.path[0:0] = self.config.doctest_path
self.type = 'single'
self.total_failures = 0
@ -246,8 +248,6 @@ Doctest summary
if self.total_failures or self.setup_failures:
self.app.statuscode = 1
sys.path[0:0] = self.config.doctest_path
def write(self, build_docnames, updated_docnames, method='update'):
if build_docnames is None:
build_docnames = sorted(self.env.all_docs)