Skip to content

Commit

Permalink
Forgot Mock cv2.
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoBektesevic committed Jan 15, 2019
1 parent 94bdb7b commit 36d00ac
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
#sys.path.insert(0, os.path.abspath("/home/dino/Desktop/lfd"))
#sys.path.insert(0, os.path.abspath('.'))


import sys
from unittest.mock import MagicMock

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

MOCK_MODULES = ['cv2', 'opencv-python']
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)


# -- Project information -----------------------------------------------------
project = 'lfd'
copyright = '2019, Dino Bektesevic'
Expand Down

0 comments on commit 36d00ac

Please sign in to comment.