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

Commit

Permalink
name change CommonWrap -> DeviceMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
shengxiang committed Mar 15, 2016
1 parent 9b71809 commit a605e84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions atx/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def remove_force(name):
if os.path.isfile(name):
os.remove(name)

class CommonWrap(object):
class DeviceMixin(object):
def __init__(self):
self.image_match_method = consts.IMAGE_MATCH_METHOD_TMPL
self.resolution = None
Expand Down Expand Up @@ -293,15 +293,15 @@ def watch(self, name, timeout=None):
w._dev = self
return w

class AndroidDevice(CommonWrap, UiaDevice):
class AndroidDevice(DeviceMixin, UiaDevice):
def __init__(self, serialno=None, **kwargs):
self._host = kwargs.get('host', '127.0.0.1')
self._port = kwargs.get('port', 5037)

kwargs['adb_server_host'] = kwargs.pop('host', self._host)
kwargs['adb_server_port'] = kwargs.pop('port', self._port)
UiaDevice.__init__(self, serialno, **kwargs)
CommonWrap.__init__(self)
DeviceMixin.__init__(self)

self._randid = base.id_generator(5)
self._serial = serialno
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Method for android and iOS
--------------------------

.. autoclass:: atx.device.CommonWrap
.. autoclass:: atx.device.DeviceMixin
:members:


Expand Down

0 comments on commit a605e84

Please sign in to comment.