Skip to content

Commit

Permalink
different mock imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nskh committed Jul 26, 2018
1 parent fa4dc2b commit 9edd9e4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@
napoleon_use_param = False
napoleon_use_ivar = True

autodoc_mock_imports = ["traci"]
# autodoc_mock_imports = ["traci"]
from unittest.mock import MagicMock

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

MOCK_MODULES = ['traci', 'sumolib']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down

0 comments on commit 9edd9e4

Please sign in to comment.