fix: import darwin module conditionally for macOS tests#2481
Open
pflakus wants to merge 1 commit intoborgbase:masterfrom
Open
fix: import darwin module conditionally for macOS tests#2481pflakus wants to merge 1 commit intoborgbase:masterfrom
pflakus wants to merge 1 commit intoborgbase:masterfrom
Conversation
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.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.