-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: skip test_cpu_freq on macOS arm64 #2146
chore: skip test_cpu_freq on macOS arm64 #2146
Conversation
3216d5e
to
1542e1c
Compare
1542e1c
to
18ebd4d
Compare
18ebd4d
to
ea600b3
Compare
psutil/tests/__init__.py
Outdated
@@ -130,6 +131,7 @@ | |||
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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this in my opinion.
psutil/tests/test_osx.py
Outdated
@@ -144,6 +146,7 @@ def test_cpu_count_cores(self): | |||
num = sysctl("sysctl hw.physicalcpu") | |||
self.assertEqual(num, psutil.cpu_count(logical=False)) | |||
|
|||
@expectedFailureIf(MACOS_ARM64) # macOS arm64 not supported: issue #1892 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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):
...
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
Signed-off-by: mayeut <mayeut@users.noreply.github.com>
* '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
Summary
Description
macOS arm64 does not support cpu_freq: issue #1892
Signed-off-by: mayeut mayeut@users.noreply.github.com