Skip to content

Commit 765fc4b

Browse files
committed
Added disconnect test
1 parent 54f3dee commit 765fc4b

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#! /usr/bin/env python2.7
2+
3+
'''
4+
Copyright (C) 2012 Diego Torres Milano
5+
Created on Feb 5, 2012
6+
7+
@author: diego
8+
'''
9+
10+
import sys
11+
import os
12+
import unittest
13+
14+
# PyDev sets PYTHONPATH, use it
15+
if 'PYTHONPATH' in os.environ:
16+
for p in os.environ['PYTHONPATH'].split(':'):
17+
if not p in sys.path:
18+
sys.path.append(p)
19+
try:
20+
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
21+
except:
22+
pass
23+
24+
from com.dtmilano.android.viewclient import View, TextView, EditText, ViewClient
25+
26+
27+
# Script gets stuck on ViewClient(device, serial) #243
28+
d, s = ViewClient.connectToDeviceOrExit()
29+
raw_input('\n** Disconnect the device now and press <ENTER>')
30+
device = ViewClient(d, s)

0 commit comments

Comments
 (0)