summaryrefslogtreecommitdiff
path: root/psutil/tests/test_linux.py
diff options
context:
space:
mode:
Diffstat (limited to 'psutil/tests/test_linux.py')
-rwxr-xr-xpsutil/tests/test_linux.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 37352ecf..0f0b09c3 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -1277,6 +1277,11 @@ class TestProcessAgainstStatus(unittest.TestCase):
self.assertEqual(
self.proc.cpu_affinity(), list(range(min_, max_ + 1)))
+ def test_cpu_affinity_eligible_cpus(self):
+ with mock.patch("psutil._pslinux.per_cpu_times") as m:
+ self.proc._proc._get_eligible_cpus()
+ assert not m.called
+
if __name__ == '__main__':
run_test_module_by_name(__file__)