Created
August 24, 2011 06:54
-
-
Save jcollado/1167446 to your computer and use it in GitHub Desktop.
Mocking modules to prevent sphinx.ext.autodoc from failing on import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mock(object): | |
def __init__(self, *args): | |
pass | |
def __getattr__(self, name): | |
return Mock | |
for mod_name in ('pygtk', 'gtk', 'gobject', 'argparse'): | |
sys.modules[mod_name] = Mock() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment