Commit d173321
test: skip live tests gracefully when BROWSERSTACK_ACCESS_KEY is unset
The test suite is a live integration suite: every test constructs
Local(os.environ['BROWSERSTACK_ACCESS_KEY']) in setUp, and Local.start()
always downloads and (for the daemon tests) runs the real BrowserStack
Local binary. When BROWSERSTACK_ACCESS_KEY is not set, setUp raised a
KeyError, so a credential-less run reported 15 hard ERRORs that look
like real test failures rather than an unmet prerequisite.
Guard setUp: read the key via os.environ.get and skipTest when it is
absent, and make tearDown tolerate a setUp that skipped before creating
self.local. No product code is touched and no assertion is weakened.
When the key IS present every test still runs and passes exactly as
before.
Result:
- no credentials -> OK (skipped=15)
- credentials+network -> OK (15 passed)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent cb286ee commit d173321
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
0 commit comments