예제 #1
0
 def test_info(self):
     n = Node()
     n['a'] = 1
     n['b'] = 2
     n['c'] = 3
     ni = n.info();
     #print ni
     self.assertEqual(ni["total_bytes"],n.total_bytes())
예제 #2
0
 def test_total_bytes(self):
     vec = array(range(100), uint32)
     n = Node()
     n['a'] = vec
     self.assertEqual(n.total_bytes(),4 * 100)
     self.assertEqual(n.total_bytes_compact(),4 * 100)
     # TODO: check if n.is_compact() should pass as well?
     # it doesn't currently
     self.assertTrue(n.fetch('a').is_compact())