File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,10 @@ def start(self, **kwargs):
53
53
54
54
os .system ('echo "" > "' + self .local_logfile_path + '"' )
55
55
try :
56
- data = json .loads (out if out else err )
56
+ if err :
57
+ data = json .loads (err )
58
+ else :
59
+ data = json .loads (out )
57
60
58
61
if data ['state' ] != "connected" :
59
62
raise BrowserStackLocalError (data ["message" ])
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ def test_running(self):
17
17
self .local .start ()
18
18
self .assertTrue (self .local .isRunning ())
19
19
20
- # def test_multiple(self):
21
- # self.assertFalse(self.local.isRunning())
22
- # self.local.start()
23
- # self.assertTrue(self.local.isRunning())
24
- # try:
25
- # self.local2 = Local(os.environ['BROWSERSTACK_ACCESS_KEY'])
26
- # self.local2.start()
27
- # except BrowserStackLocalError as e:
28
- # self.assertEqual(e.message, "Either another browserstack local client is running on your machine or some server is listening on port 45691")
20
+ def test_multiple (self ):
21
+ self .assertFalse (self .local .isRunning ())
22
+ self .local .start ()
23
+ self .assertTrue (self .local .isRunning ())
24
+ try :
25
+ self .local2 = Local (os .environ ['BROWSERSTACK_ACCESS_KEY' ])
26
+ self .local2 .start ()
27
+ except BrowserStackLocalError as e :
28
+ self .assertEqual (e .message , "Either another browserstack local client is running on your machine or some server is listening on port 45691" )
29
29
30
30
def test_verbose (self ):
31
31
self .local .start (v = True , onlyCommand = True )
You can’t perform that action at this time.
0 commit comments