Skip to content
Snippets Groups Projects
Commit 7cba9c22 authored by Donald Stufft's avatar Donald Stufft
Browse files

Properly Mock out the dependencies for building the docs

parent 000b6e2d
No related branches found
No related tags found
No related merge requests found
......@@ -11,12 +11,13 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
......@@ -255,10 +256,8 @@ class Mock(object):
def __getattr__(cls, name):
if name in ("__file__", "__path__"):
return "/dev/null"
elif name[0] == name[0].upper():
mockType = type(name, (), {})
mockType.__module__ = __name__
return mockType
elif name in ("__name__",):
return "mocked"
else:
return Mock()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment