Whether the browser under test was started headless. Without a window manager some behavior is not modelled at all - notably window focus, which headless Chromium reports as always held by the current window - so tests that assert on it need to know which mode they are running in.
(request)
| 647 | |
| 648 | @pytest.fixture |
| 649 | def headless(request): |
| 650 | """Whether the browser under test was started headless. |
| 651 | |
| 652 | Without a window manager some behavior is not modelled at all - notably window |
| 653 | focus, which headless Chromium reports as always held by the current window - so |
| 654 | tests that assert on it need to know which mode they are running in. |
| 655 | """ |
| 656 | return bool(request.config.option.headless) |
| 657 | |
| 658 | |
| 659 | @pytest.fixture(autouse=True, scope="session") |
nothing calls this directly
no outgoing calls
no test coverage detected