def test_with_field(self): root = self._file.root() f = root.create_field("test_scalar","float64") self.assertEqual(get_size(f),1) f = root.create_field("test_multidim","int16",shape=(1024,2048)) self.assertEqual(get_size(f),1024*2048)
def test_with_attribute(self): #this should work as the file does not exist yet root = self._file.root() a = root.attributes.create("test_scalar","float32") self.assertEqual(get_size(a),1) a = root.attributes.create("test_multidim","ui64",shape=(3,4)) self.assertEqual(get_size(a),12)
def test_with_group(self): root = self._file.root() root.create_group("entry_1","NXentry") root.create_group("entry_2","NXentry") self.assertEqual(get_size(root),2)