Skip to content
Snippets Groups Projects
Commit af963688 authored by Aditya Dange's avatar Aditya Dange
Browse files

Update logger mocking

parent 8147edce
Branches
Tags
No related merge requests found
......@@ -27,10 +27,22 @@
# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
autodoc_mock_imports = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command',
'future', 'future.utils', 'logging', 'logging.handlers']
'future', 'future.utils']
import sys
import os
from mock import Mock as MagicMock
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()
# Mock tango modules
MOCK_MODULES = ['logging', 'logging.handlers']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment