def parse_meminfo(self, look_for):
        with open('/proc/meminfo', 'rb') as f:
            for line in f:
                if line.startswith(look_for):
                    return int(line.split()[1]) * 1024
        raise ValueError("can't find %s" % look_for)

    # XXX - failing tests

    # def test_vmem_total(self):
    #     self.assertEqual(
    #         psutil.virtual_memory().total, self.parse_meminfo("MemTotal:"))

    # def test_vmem_free(self):
    #     self.assertEqual(
    #         psutil.virtual_memory().buffers, self.parse_meminfo("MemFree:"))
dataset/ETHPy150Open giampaolo/psutil/psutil/tests/test_bsd.py/NetBSDSpecificTestCase.parse_meminfo/original