diff --git a/docs/source/conf.py b/docs/source/conf.py index e381c25b..62d74cbd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,6 +20,17 @@ import os, re, shlex, sys # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../..')) +from unittest.mock import MagicMock + +class Mock(MagicMock): + @classmethod + def __getattr__(cls, name): + return Mock() + +MOCK_MODULES = ['h5py', 'matplotlib'] +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) + + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here.