Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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())
Esempio n. 4
0
 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())