summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-09-21 12:18:23 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2016-09-21 12:18:23 +0200
commitb278bf43b76c85560372a567d1af10953b67273f (patch)
tree591ee18fcfb0975a555d6705b29af2ec2bb8a8b3
parent57ea1253820c0df42698625047d708aaa2611506 (diff)
downloadpsutil-b278bf43b76c85560372a567d1af10953b67273f.tar.gz
add more tests
-rw-r--r--psutil/tests/test_linux.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index cd213d89..7ee92597 100644
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -240,7 +240,6 @@ class TestSystemVirtualMemory(unittest.TestCase):
MemAvailable: 6574984 kB
MemFree: 2057400 kB
MemTotal: 16325648 kB
- Shmem: 577588 kB
SReclaimable: 346648 kB
""").encode())
else:
@@ -258,9 +257,14 @@ class TestSystemVirtualMemory(unittest.TestCase):
self.assertTrue(w.filename.endswith('psutil/_pslinux.py'))
self.assertIn(
"memory stats couldn't be determined", str(w.message))
+ self.assertIn("cached", str(w.message))
+ self.assertIn("shared", str(w.message))
+ self.assertIn("active", str(w.message))
+ self.assertIn("inactive", str(w.message))
self.assertEqual(ret.cached, 0)
self.assertEqual(ret.active, 0)
self.assertEqual(ret.inactive, 0)
+ self.assertEqual(ret.shared, 0)
def test_avail_old_percent(self):
# Make sure that our calculation of avail mem for old kernels