RedHatQE/cfme_tests — pull request #311 by seandst (2014-01-20 20:02:40+00:00)
Title: browser fixture is more resilient to browsers closing

The browser fixture is now being used as a mark, and returns the browser callable itself instead of whatever the value of `thread_locals.browser` was when the fixture was used. This has a few benefits:

- The browser is no longer started and stopped by a context manager. Rather, pytest hooks are used to manage the browser context.
- browser is always a callable, so using the browser fixture is no different than `from utils.browser import browser` (except using the fixture will start a browser for you inside py.test)

There is a new function, `utils.browser.ensure_browser_open` that will poke selenium to see if a working browser is open, and start a new one if not.

There are minor issues that I'll comment on inline.