diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-09-11 14:12:47 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-09-11 14:12:47 +0200 |
commit | b625a80babb6ea437127f5b180ae92c3c2162fb6 (patch) | |
tree | 4e0d78d78366ae9587a8d8a67ed625ceebe94c48 | |
parent | 273ea689749fcfcdad82ad638e829cad2aea4c28 (diff) | |
download | psutil-b625a80babb6ea437127f5b180ae92c3c2162fb6.tar.gz |
remove unreliable test
-rw-r--r-- | docs/index.rst | 4 | ||||
-rw-r--r-- | psutil/tests/test_linux.py | 26 |
2 files changed, 2 insertions, 28 deletions
diff --git a/docs/index.rst b/docs/index.rst index dbd1d329..fa83aefa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -178,8 +178,8 @@ Memory - **available**: the actual amount of available memory that can be given instantly to processes that request more memory in bytes; this is calculated by summing different memory values depending on the platform - (e.g. free + buffers + cached on Linux) and it is supposed to be used to - monitor actual memory usage in a cross platform fashion. + (e.g. ``(free + buffers + cached)`` on Linux) and it is supposed to be used + to monitor actual memory usage in a cross platform fashion. - **percent**: the percentage usage calculated as ``(total - available) / total * 100``. - **used**: memory used, calculated differently depending on the platform and diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index e9f5555f..9f7c25fb 100644 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -894,32 +894,6 @@ class TestProcess(unittest.TestCase): p.num_ctx_switches().involuntary, invol, delta=2) - def test_memory_maps(self): - src = textwrap.dedent(""" - import time - with open("%s", "w") as f: - time.sleep(10) - """ % TESTFN) - sproc = pyrun(src) - self.addCleanup(reap_children) - call_until(lambda: os.listdir('.'), "'%s' not in ret" % TESTFN) - p = psutil.Process(sproc.pid) - time.sleep(.1) - maps = p.memory_maps(grouped=False) - pmap = sh('pmap -x %s' % p.pid).split('\n') - # get rid of header - del pmap[0] - del pmap[0] - while maps and pmap: - this = maps.pop(0) - other = pmap.pop(0) - addr, _, rss, dirty, mode, path = other.split(None, 5) - if not path.startswith('[') and not path.endswith(']'): - self.assertEqual(path, os.path.basename(this.path)) - self.assertEqual(int(rss) * 1024, this.rss) - # test only rwx chars, ignore 's' and 'p' - self.assertEqual(mode[:3], this.perms[:3]) - def test_memory_full_info(self): src = textwrap.dedent(""" import time |