[h5py] 07/26: Fix missing property list in group creation (issue 108)

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:20:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.1
in repository h5py.

commit 5b5d32bfca8155eb58b15fe1c36535fc673882f0
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Thu Jul 15 04:16:04 2010 +0000

    Fix missing property list in group creation (issue 108)
---
 h5py/highlevel.py             | 5 ++++-
 h5py/tests/high/test_group.py | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/h5py/highlevel.py b/h5py/highlevel.py
index c700849..d3f6370 100644
--- a/h5py/highlevel.py
+++ b/h5py/highlevel.py
@@ -263,7 +263,10 @@ class Group(HLObject, _DictCompat):
             if _rawid is not None:
                 id = _rawid
             elif create:
-                id = h5g.create(parent_object.id, name)
+                if config.API_18:
+                    id = h5g.create(parent_object.id, name, lcpl=self._lcpl)
+                else:
+                    id = h5g.create(parent_object.id, name)
             else:
                 id = h5g.open(parent_object.id, name)
             HLObject.__init__(self, id)
diff --git a/h5py/tests/high/test_group.py b/h5py/tests/high/test_group.py
index 3c79e06..7ca0eb6 100644
--- a/h5py/tests/high/test_group.py
+++ b/h5py/tests/high/test_group.py
@@ -28,6 +28,13 @@ class TestCreate(GroupBase):
         self.assertIsInstance(g, h5py.Group)
         self.assertEqual(g.name, '/new')
 
+    @tests.require(api=18)
+    def test_intermediate(self):
+        """ (Group) Create with missing intermediate groups """
+        g = self.f.create_group("/a/b/c/d")
+        self.assert_("/a/b/c/d" in self.f)
+        self.assertIsInstance(g, h5py.Group)
+
     def test_conflict(self):
         """ (Group) Create with existing name raises ValueError """
         self.f.create_group('new')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list