Skip to content

Commit

Permalink
Made Mock() objects for readthedocs callable
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisdhaas committed Jun 16, 2012
1 parent 69a4c5f commit 00c2a7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@
# on systems without the packages
mocks = ['markdown', 'markdown.preprocessors.Preprocessor', 'mardown.Extension', 'rdflib']
class Mock(object):
def __init__(self, *args):
def __init__(self, *args, **kwargs):
pass

def __getattr__(self, name):
return Mock()

def __call__(self, *args, **kwargs):
return Mock()

for mod_name in mocks:
sys.modules[mod_name] = Mock()

Expand Down

0 comments on commit 00c2a7d

Please sign in to comment.