Skip to content

Commit

Permalink
skip failing test on MACOS
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Apr 6, 2024
1 parent 5350529 commit e7cb768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion psutil/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,10 @@ class system_namespace:
('virtual_memory', (), {}),
]
if HAS_CPU_FREQ:
getters += [('cpu_freq', (), {'percpu': True})]
if MACOS and platform.machine() == 'arm64': # skipped due to #1892
pass
else:
getters += [('cpu_freq', (), {'percpu': True})]
if HAS_GETLOADAVG:
getters += [('getloadavg', (), {})]
if HAS_SENSORS_TEMPERATURES:
Expand Down
4 changes: 3 additions & 1 deletion psutil/tests/test_osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def test_cpu_count_cores(self):
self.assertEqual(num, psutil.cpu_count(logical=False))

# TODO: remove this once 1892 is fixed
@unittest.skipIf(platform.machine() == 'arm64', "skipped due to #1892")
@unittest.skipIf(
MACOS and platform.machine() == 'arm64', "skipped due to #1892"
)
def test_cpu_freq(self):
freq = psutil.cpu_freq()
self.assertEqual(
Expand Down

0 comments on commit e7cb768

Please sign in to comment.