mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-06-28 09:29:37 +02:00
Add macOS support
This commit is contained in:
parent
143aff4bd2
commit
d09200f01d
10 changed files with 240 additions and 50 deletions
|
|
@ -81,3 +81,15 @@ def test_async_default_context_kwargs_match_sync():
|
|||
a = AsyncIP(seed=42, timezone="America/New_York", locale="de-DE")
|
||||
s = SyncIP(seed=42, timezone="America/New_York", locale="de-DE")
|
||||
assert a._default_context_kwargs() == s._default_context_kwargs()
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_async_resolve_headless_raises_clear_error_on_macos(monkeypatch):
|
||||
"""The async launcher shares the same hidden-display limitation as the
|
||||
sync launcher, so ``headless=True`` on macOS should fail the same way."""
|
||||
import sys as _sys
|
||||
monkeypatch.setattr(_sys, "platform", "darwin")
|
||||
|
||||
ip = AsyncIP(seed=42, headless=True)
|
||||
with pytest.raises(RuntimeError, match="headless=True is not yet supported on macOS"):
|
||||
ip._resolve_headless()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue