chore: skip test_cpu_freq on macOS arm64#2146
Merged
giampaolo merged 1 commit intogiampaolo:masterfrom Oct 18, 2022
Merged
Conversation
3216d5e to
1542e1c
Compare
1542e1c to
18ebd4d
Compare
18ebd4d to
ea600b3
Compare
giampaolo
requested changes
Oct 10, 2022
psutil/tests/__init__.py
Outdated
| CI_TESTING = APPVEYOR or GITHUB_ACTIONS | ||
| # are we a 64 bit process? | ||
| IS_64BIT = sys.maxsize > 2 ** 32 | ||
| MACOS_ARM64 = MACOS and platform.machine() == 'arm64' |
Owner
There was a problem hiding this comment.
I would define this as a generic ARM64 instead of making it specific for macOS.
Regardless, since it's only being used once across the entire code base, I think you can simply use platform.machine() later, in the test itself.
psutil/tests/__init__.py
Outdated
| return unittest.expectedFailure(func) | ||
| else: | ||
| return func | ||
| return wrapper |
Owner
There was a problem hiding this comment.
No need for this in my opinion.
psutil/tests/test_osx.py
Outdated
| num = sysctl("sysctl hw.physicalcpu") | ||
| self.assertEqual(num, psutil.cpu_count(logical=False)) | ||
|
|
||
| @expectedFailureIf(MACOS_ARM64) # macOS arm64 not supported: issue #1892 |
Owner
There was a problem hiding this comment.
See my comment above: there's no need of an additional decorator. Please define this as:
# TODO: remove this once 1892 is fixed
@unittes.skipIf(MACOS and platform.machine() == 'arm64', "skipped due to #1892")
def test_cpu_freq(self):
...
Owner
|
If this is still valid, there are some comments I added that should be addressed. |
macOS arm64 does not support cpu_freq: issue giampaolo#1892 Signed-off-by: mayeut <mayeut@users.noreply.github.com>
ea600b3 to
66fa586
Compare
mayeut
added a commit
to mayeut/psutil
that referenced
this pull request
Oct 18, 2022
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
giampaolo
pushed a commit
that referenced
this pull request
Oct 18, 2022
ddelange
added a commit
to ddelange/psutil
that referenced
this pull request
Oct 28, 2022
* 'master' of https://github.com/giampaolo/psutil: add windows test for free physical mem giampaolo#2074 fix OSX tests broken by accident update HISTORY + give CREDITS for @arossert, @smoofra, @mayeut for giampaolo#2102, giampaolo#2156, giampaolo#2010 build fix for Mac OS, Apple Silicon (giampaolo#2010) Linux: fix missing SPEED_UNKNOWN definition (giampaolo#2156) Use system-level values for Windows virtual memory (giampaolo#2077) feature: use ABI3 for cp36+ (giampaolo#2102) fix py2 compatibility improve API speed benchmark script giampaolo#2102 fix: linter issues from giampaolo#2146 (giampaolo#2155) chore: skip test_cpu_freq on macOS arm64 (giampaolo#2146) pre-release + give CREDITS to @mayeut (PR giampaolo#2040) and @eallrich (new supporter) Fix a typo (giampaolo#2047) move isort and coverage config into pyproject.toml fix giampaolo#2021, fix giampaolo#1954, provide OSX arm64 bins + add pyproject.toml (giampaolo#2040) refactor git_log.py
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.
Summary
Description
macOS arm64 does not support cpu_freq: issue #1892
Signed-off-by: mayeut mayeut@users.noreply.github.com