def human(self): for mem_i, (mem_b, mem_hs) in self._mems.items(): mem = Memory(mem_i) mem_h = Memory(mem_hs) mem_human = mem.human() self.assertEqual(mem_human, mem_h) self.assertEqual(mem_human.units(), mem_h.units()) self.assertEqual(str(mem_human), mem_hs)
def human(self): for mem_i, (mem_b, mem_hs) in self._mems.items(): mem = Memory(mem_i) mem_h = Memory(mem_hs) mem_human = mem.human() self.assertEqual(mem_human, mem_h) self.assertEqual(mem_human.units(), mem_h.units()) self.assertEqual(str(mem_human), mem_hs)
def test_units(self): mem = Memory('1.5g') self.assertEqual(mem.units(), "g")
def test_units(self): mem = Memory('1.5g') self.assertEqual(mem.units(), "g")