Add macOS support

This commit is contained in:
dannyward630 2026-05-17 21:05:20 -04:00
parent 143aff4bd2
commit d09200f01d
10 changed files with 240 additions and 50 deletions

View file

@ -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()