def testOpenInto(self): """Test that we can resize a tree""" fdt = Fdt.create_empty_tree(128) self.assertEquals(128, fdt.totalsize()) fdt.resize(256) self.assertEquals(256, fdt.totalsize()) fdt.pack() self.assertTrue(fdt.totalsize() < 128)
def testEmpty(self): """Test that we can create an empty tree""" self.assertEquals(-libfdt.NOSPACE, Fdt.create_empty_tree(1, (libfdt.NOSPACE,))) fdt = Fdt.create_empty_tree(128) self.assertEquals(128, fdt.totalsize())
def testEmpty(self): """Test that we can create an empty tree""" self.assertEquals(-libfdt.NOSPACE, Fdt.create_empty_tree(1, (libfdt.NOSPACE, ))) fdt = Fdt.create_empty_tree(128) self.assertEquals(128, fdt.totalsize())