diff --git a/Code/Mantid/docs/source/conf.py b/Code/Mantid/docs/source/conf.py
index ea20dcc36f4a3410e03cde8f03f89dc9b0b5889f..6752f00f7f5f97768b0e8cf600a49402e967a255 100644
--- a/Code/Mantid/docs/source/conf.py
+++ b/Code/Mantid/docs/source/conf.py
@@ -49,6 +49,13 @@ release = '0.01'
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
 
+# -- Options for doctest --------------------------------------------------
+
+# Run this before each test is executed
+doctest_global_setup = """
+from mantid.simpleapi import *
+"""
+
 # -- Options for HTML output ----------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for