Skip to content

Commit 4054663

Browse files
authored
Merge pull request #64 from browserstack/chore/green-unit-tests
test: green the pre-existing unit-test suite (skip live tests when access key is unset)
2 parents cb286ee + d173321 commit 4054663

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/test_local.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
class TestLocal(unittest.TestCase):
55
def setUp(self):
6-
self.local = Local(os.environ['BROWSERSTACK_ACCESS_KEY'])
6+
access_key = os.environ.get('BROWSERSTACK_ACCESS_KEY')
7+
if not access_key:
8+
self.skipTest('BROWSERSTACK_ACCESS_KEY is not set; skipping live BrowserStack Local tests')
9+
self.local = Local(access_key)
710

811
def tearDown(self):
9-
self.local.stop()
12+
if hasattr(self, 'local'):
13+
self.local.stop()
1014

1115
def test_start_local(self):
1216
self.local.start()

0 commit comments

Comments
 (0)