18
18
@author: Diego Torres Milano
19
19
'''
20
20
21
- __version__ = '13.1.5 '
21
+ __version__ = '13.1.6 '
22
22
23
23
import sys
24
24
import warnings
@@ -3983,7 +3983,7 @@ def writeImageToFile(self, filename, _format="PNG", deviceart=None, dropshadow=T
3983
3983
deviceart = 'nexus_7' # 2012
3984
3984
elif hardware == 'flo' :
3985
3985
deviceart = 'nexus_7_2013'
3986
- elif hardware in ['mt5861' , 'mt5890' ]:
3986
+ elif hardware in ['mt5861' , 'mt5890' , 'maserati' ]:
3987
3987
deviceart = 'tv_1080p'
3988
3988
elif hardware == 'universal5410' :
3989
3989
deviceart = 'samsung_s4'
@@ -4461,7 +4461,7 @@ def setUpClass(cls):
4461
4461
4462
4462
@classmethod
4463
4463
def tearDownClass (cls ):
4464
- if cls .kwargs2 ['useuiautomatorhelper' ]:
4464
+ if 'useuiautomatorhelper' in cls . kwargs2 and cls .kwargs2 ['useuiautomatorhelper' ]:
4465
4465
for d in cls .globalDevices :
4466
4466
d .vc .uiAutomatorHelper .quit ()
4467
4467
@@ -4529,7 +4529,7 @@ def setUp(self):
4529
4529
# A list containing only one device was specified
4530
4530
self .serialno = __devices [0 ]
4531
4531
self .device , self .serialno = ViewClient .connectToDeviceOrExit (serialno = self .serialno , ** self .kwargs1 )
4532
- if self .options [CulebraOptions .START_ACTIVITY ]:
4532
+ if CulebraOptions . START_ACTIVITY in self . options and self .options [CulebraOptions .START_ACTIVITY ]:
4533
4533
self .device .startActivity (component = self .options [CulebraOptions .START_ACTIVITY ])
4534
4534
self .vc = ViewClient (self .device , self .serialno , ** self .kwargs2 )
4535
4535
# Set the default device, to be consistent with multi-devices case
@@ -4541,7 +4541,7 @@ def tearDown(self):
4541
4541
pass
4542
4542
4543
4543
def preconditions (self ):
4544
- if self .options [CulebraOptions .ORIENTATION_LOCKED ] is not None :
4544
+ if CulebraOptions . ORIENTATION_LOCKED in self . options and self .options [CulebraOptions .ORIENTATION_LOCKED ] is not None :
4545
4545
# If orientation locked was set to a valid orientation value then use it to compare
4546
4546
# against current orientation (when the test is run)
4547
4547
return (self .device .display ['orientation' ] == self .options [CulebraOptions .ORIENTATION_LOCKED ])
0 commit comments