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):
5353
5454 os .system ('echo "" > "' + self .local_logfile_path + '"' )
5555 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 )
5760
5861 if data ['state' ] != "connected" :
5962 raise BrowserStackLocalError (data ["message" ])
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ def test_running(self):
1717 self .local .start ()
1818 self .assertTrue (self .local .isRunning ())
1919
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" )
2929
3030 def test_verbose (self ):
3131 self .local .start (v = True , onlyCommand = True )
You can’t perform that action at this time.
0 commit comments