def testMemoryStatusTotal(self): device_info.PROC_MEMINFO = 'testdata/device_info/meminfo_total' mi = device_info.MemoryStatusLinux26() self.assertEqual(mi.Total, 123456) self.assertEqual(mi.Free, 0)
def testMemoryStatusFree(self): device_info.PROC_MEMINFO = 'testdata/device_info/meminfo_free' mi = device_info.MemoryStatusLinux26() self.assertEqual(mi.Total, 0) self.assertEqual(mi.Free, 654321)
def testMemoryStatusSuccess(self): device_info.PROC_MEMINFO = 'testdata/device_info/meminfo' mi = device_info.MemoryStatusLinux26() self.assertEqual(mi.Total, 123456) self.assertEqual(mi.Free, 654321)