Commits

Georg Brandl committed f2d6c5a

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

  • Participants
  • Parent commits 9d68dd8

Comments (0)

Files changed (2)

 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.
 

sphinx/ext/doctest.py

         # 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
         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)