summaryrefslogtreecommitdiff
path: root/psutil/tests/test_linux.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-10-10 06:37:32 +0000
committerGiampaolo Rodola <g.rodola@gmail.com>2019-10-10 06:37:32 +0000
commit63fcc0e3a5c5bc155970d40df99acfac4a3aa0de (patch)
tree4acdab3be5e178eaed7647a962bbd20762b55caa /psutil/tests/test_linux.py
parentaf4b6c060e383a8c2f4bee478de62a294d4f7c5f (diff)
downloadpsutil-63fcc0e3a5c5bc155970d40df99acfac4a3aa0de.tar.gz
fix more CentOS failures
Diffstat (limited to 'psutil/tests/test_linux.py')
-rwxr-xr-xpsutil/tests/test_linux.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 77958ada..09fed4e4 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -842,25 +842,6 @@ class TestSystemCPUFrequency(unittest.TestCase):
freq = psutil.cpu_freq()
self.assertEqual(freq.current, 200)
- # Also test that NotImplementedError is raised in case no
- # current freq file is present.
-
- def open_mock(name, *args, **kwargs):
- if name.endswith('/scaling_cur_freq'):
- raise IOError(errno.ENOENT, "")
- elif name.endswith('/cpuinfo_cur_freq'):
- raise IOError(errno.ENOENT, "")
- elif name == '/proc/cpuinfo':
- raise IOError(errno.ENOENT, "")
- else:
- return orig_open(name, *args, **kwargs)
-
- orig_open = open
- patch_point = 'builtins.open' if PY3 else '__builtin__.open'
- with mock.patch(patch_point, side_effect=open_mock):
- with mock.patch('os.path.exists', return_value=True):
- self.assertRaises(NotImplementedError, psutil.cpu_freq)
-
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemCPUStats(unittest.TestCase):