Skip to content

Commit

Permalink
second attempt at fixing failing build for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
aroberge committed Dec 22, 2014
1 parent d4c0416 commit 2acd4b2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@
# version is used.
sys.path.insert(0, project_root)

import mock

MOCK_MODULES = ['PyQt', 'QtGui', 'QtCore']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = mock.Mock()

import easygui_qt
from unittest.mock import MagicMock

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

MOCK_MODULES = ['PyQt', 'QtGui', 'QtCore']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# -- General configuration ---------------------------------------------

Expand Down

0 comments on commit 2acd4b2

Please sign in to comment.