Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore mypy errors and skip tests that don't work on MacOS #3420

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

yadudoc
Copy link
Member

@yadudoc yadudoc commented May 8, 2024

Description

This PR makes two changes:

  1. os.sched_(get/set)affinity is not supported on MacOS. This PR ignores mypy errors from code blocks that touch on affinity that are not used in MacOS.
  2. Skip tests that touch on affinity that are not expected to work on MacOS.

Type of change

Choose which options apply, and delete the ones which do not apply.

  • Bug fix
  • Code maintenance/cleanup

@yadudoc yadudoc added the quick-review A PR that should be very easy (and quick!) to review label May 8, 2024
@yadudoc yadudoc requested a review from benclifford May 8, 2024 16:00
@benclifford
Copy link
Collaborator

this is breaking in CI

@benclifford benclifford removed the quick-review A PR that should be very easy (and quick!) to review label May 10, 2024
@benclifford
Copy link
Collaborator

@yadudoc i just pushed a possible fix for the most recent mypy error on Linux - I haven't tested if this works on OS X.

@benclifford benclifford changed the title Ignore mypy erorrs and skip tests that don't work on MacOS Ignore mypy errors and skip tests that don't work on MacOS May 24, 2024
@yadudoc
Copy link
Member Author

yadudoc commented Jun 3, 2024

@benclifford This works on OSX. Let's get this merged?

@benclifford
Copy link
Collaborator

I'm a bit uncomfortable with this test style of "we know this test fails so we ignore that failure" and I've been pushing a bit to make developers explicitly acknowledge that some tests are not being disabled... there is no "skip" in CI, just pass or fail, and this style forces this test to "pass" in the sense of not failing, on platforms without sched_getaffinity.

@pytest.mark.skipif('sched_getaffinity' not in dir(os), reason='System does not support sched_setaffinity')

@yadudoc yadudoc merged commit addfd8c into master Jun 3, 2024
6 checks passed
@yadudoc yadudoc deleted the osx_sched_affinity branch June 3, 2024 16:46
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.

None yet

2 participants