Skip to content

Commit 46e304d

Browse files
committed
RTD3
1 parent 71c152a commit 46e304d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/source/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,19 @@
1414

1515
import sys
1616
import os
17+
from unittest.mock import MagicMock
1718

1819
sys.path.insert(0, os.path.abspath("../.."))
1920

21+
22+
class Mock(MagicMock):
23+
@classmethod
24+
def __getattr__(cls, name):
25+
return Mock()
26+
27+
MOCK_MODULES = [ 'numpy', 'scipy']
28+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
29+
2030
# If extensions (or modules to document with autodoc) are in another directory,
2131
# add these directories to sys.path here. If the directory is relative to the
2232
# documentation root, use os.path.abspath to make it absolute, like shown here.

0 commit comments

Comments
 (0)