Skip to content

fix: import darwin module conditionally for macOS tests#2481

Open
pflakus wants to merge 1 commit intoborgbase:masterfrom
pflakus:fix/macos-test-check-2480
Open

fix: import darwin module conditionally for macOS tests#2481
pflakus wants to merge 1 commit intoborgbase:masterfrom
pflakus:fix/macos-test-check-2480

Conversation

@pflakus
Copy link
Copy Markdown

@pflakus pflakus commented Mar 28, 2026

Description

The change makes the import of a macOS-specific module conditional, so it's only attempted, if the system running the test is macOS. This fixes the failed import observed in #2480.

Related Issue

see #2480

Motivation and Context

It fixes a bug that prevents non-macOS systems from executing this project's test suite.

How Has This Been Tested?

I've rerun the steps outlined in CONTRIBUTING.md, and saw all tests pass (or skip) as expected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

This change prevents the import from being attempted, if the system is not macOS. (The previous `pytest.mark.skipif`-check only prevents the test methods from being called.)
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