コード例 #1
0
ファイル: utilsTests.py プロジェクト: yingyun001/vdsm
 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)
コード例 #2
0
ファイル: utilsTests.py プロジェクト: kripper/vdsm
 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)