Commit 0715b9fe authored by PIOLLE's avatar PIOLLE
Browse files

add mock for doc generation

parent b5d115cf
......@@ -305,3 +305,36 @@ epub_copyright = u'2014, Jeff Piolle'
# If false, no index is generated.
#epub_use_index = True
# to short-cut some libs when reading the doc
class Mock(object):
__all__ = []
def __init__(self, *args, **kwargs):
def __call__(self, *args, **kwargs):
return Mock()
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
return Mock()
MOCK_MODULES = ['numpy',
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment