Example #1
0
 def test_uneven_division(self):
     self.meminfo['MemFree'] = '3333333 kB'
     self.meminfo['Buffers'] = '1111111 kB'
     self.meminfo['Cached'] =  '1111111 kB'
     r = util.get_availmem(self.meminfo, 'M')
     self.assertEqual(5555, r)
Example #2
0
 def test_returns_gigabytes(self):
     r = util.get_availmem(self.meminfo, 'G')
     self.assertEqual(9, r)
Example #3
0
 def test_returns_megabytes(self):
     r = util.get_availmem(self.meminfo, 'M')
     self.assertEqual(9000, r)
Example #4
0
 def test_uneven_division(self):
     self.meminfo['MemFree'] = '3333333 kB'
     self.meminfo['Buffers'] = '1111111 kB'
     self.meminfo['Cached'] = '1111111 kB'
     r = util.get_availmem(self.meminfo, 'M')
     self.assertEqual(5555, r)
Example #5
0
 def test_returns_gigabytes(self):
     r = util.get_availmem(self.meminfo, 'G')
     self.assertEqual(9, r)
Example #6
0
 def test_returns_megabytes(self):
     r = util.get_availmem(self.meminfo, 'M')
     self.assertEqual(9000, r)