def testParseMemInfo(self): testPath = os.path.realpath(__file__) dirName = os.path.dirname(testPath) path = os.path.join(dirName, "mem_info.out") with open(path) as f: meminfo = utils._parseMemInfo(f.readlines()) # testing some random fields self.assertEquals(meminfo['NFS_Unstable'], 0) self.assertEquals(meminfo['KernelStack'], 2760) self.assertEquals(meminfo['Inactive'], 1432748)