mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
#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:
@@ -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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user