Skip to content

Commit

Permalink
mock
Browse files Browse the repository at this point in the history
  • Loading branch information
untzag committed Aug 8, 2017
1 parent 8dbaf9e commit bb5e359
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,26 @@
#
import os
import sys
from unittest.mock import MagicMock
import sphinx_gallery
import math

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../WrightTools'))


# -- Mocked Modules -------------------------------------------------------


class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()

MOCK_MODULES = ['numpy', 'h5py']
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.
Expand Down

0 comments on commit bb5e359

Please sign in to comment.