Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
mock some moduless
Browse files Browse the repository at this point in the history
  • Loading branch information
shengxiang committed Mar 13, 2016
1 parent 1e535bd commit 78e329a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
11 changes: 3 additions & 8 deletions atx/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@
import warnings
import logging

try:
import xkjxxx
import cv2
import numpy as np
import aircv as ac
except:
warnings.warn("OpenCV and Numpy need to be installed.", ImportWarning)

import cv2
import numpy as np
import aircv as ac
from uiautomator import device as d
from uiautomator import Device as UiaDevice
from uiautomator import AutomatorDeviceObject
Expand Down
9 changes: 9 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,12 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

# mock some functions
class Mock(object):
@classmethod
def __getattr__(cls, name):
return Mock()

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

0 comments on commit 78e329a

Please sign in to comment.