Skip to content

fix: guard darwin network test import behind platform check#2470

Open
Denay2468 wants to merge 3 commits intoborgbase:masterfrom
Denay2468:fix/skip-darwin-tests-on-non-macos
Open

fix: guard darwin network test import behind platform check#2470
Denay2468 wants to merge 3 commits intoborgbase:masterfrom
Denay2468:fix/skip-darwin-tests-on-non-macos

Conversation

@Denay2468
Copy link
Copy Markdown
Contributor

Problem

Running uv run pytest tests/ on Windows fails at collection time:

ModuleNotFoundError: No module named 'CoreWLAN'

pytestmark skips test execution but cannot prevent the top-level
import from running on Windows where CoreWLAN does not exist.
This crashes the entire test suite before any test runs.

Fix

Wrapped the import in if sys.platform == 'darwin' so it never
executes on Windows or Linux.

Before / After

Before: ERROR collecting tests/network_manager/test_darwin.py
After: 11 darwin tests skip cleanly on Windows

Tested on

  • Windows 11 ✅

@Denay2468
Copy link
Copy Markdown
Contributor Author

All checks passing. Fixed CRLF -> LF line endings. Ready for review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant