[h5py] 393/455: Tests for HLO
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:54 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.
commit 5649418083cd2352a973435db46f8652b6107e25
Author: andrewcollette <andrew.collette at gmail.com>
Date: Mon Feb 8 02:48:02 2010 +0000
Tests for HLO
---
h5py/tests/high/test_file.py | 22 ---------------
h5py/tests/high/test_hlobject.py | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 22 deletions(-)
diff --git a/h5py/tests/high/test_file.py b/h5py/tests/high/test_file.py
index cd00adf..64a39dd 100644
--- a/h5py/tests/high/test_file.py
+++ b/h5py/tests/high/test_file.py
@@ -198,28 +198,6 @@ class TestUnicode(FileBase):
self.assertEqual(self.f.filename, self.name)
self.assert_(isinstance(self.f.filename, unicode))
-class TestProps(FileBase):
-
- def setUp(self):
- self.name = mktemp()
- self.f = h5py.File(self.name, 'w')
-
- def tearDown(self):
- if self.f:
- self.f.close()
- import os
- os.unlink(self.name)
-
- @tests.require(api=18)
- def test_lcpl(self):
- lcpl = self.f._lcpl
- self.assertIsInstance(lcpl, h5py.h5p.PropLCID)
-
- @tests.require(api=18)
- def test_lapl(self):
- lapl = self.f._lapl
- self.assertIsInstance(lapl, h5py.h5p.PropLAID)
-
class TestMode(FileBase):
def test_mode(self):
diff --git a/h5py/tests/high/test_hlobject.py b/h5py/tests/high/test_hlobject.py
new file mode 100644
index 0000000..9133600
--- /dev/null
+++ b/h5py/tests/high/test_hlobject.py
@@ -0,0 +1,60 @@
+from tempfile import mktemp
+
+from h5py import tests
+import h5py
+
+class Base(tests.HTest):
+
+ def setUp(self):
+ self.name = mktemp()
+ self.f = h5py.File(self.name, 'w')
+
+ def tearDown(self):
+ import os
+ try:
+ if self.f:
+ self.f.close()
+ finally:
+ if self.name and os.path.exists(self.name):
+ os.unlink(self.name)
+
+class TestPropFile(Base):
+
+ def test_file2(self):
+ """ (HLObject) .file property on subclasses """
+ g = self.f.create_group('foo')
+ g2 = self.f.create_group('foo/bar')
+ self.assertEqual(self.f, self.f.file)
+ self.assertEqual(self.f, g.file)
+ self.assertEqual(self.f, g2.file)
+
+class TestProps(Base):
+
+ @tests.require(api=18)
+ def test_lcpl(self):
+ """ (HLObject) lcpl """
+ lcpl = self.f._lcpl
+ self.assertIsInstance(lcpl, h5py.h5p.PropLCID)
+
+ @tests.require(api=18)
+ def test_lapl(self):
+ """ (HLObject) lapl """
+ lapl = self.f._lapl
+ self.assertIsInstance(lapl, h5py.h5p.PropLAID)
+
+class TestParent(Base):
+
+ @tests.fixme("File object does not compare equal to Group '/'")
+ def test_parent(self):
+ """ (HLObject) .parent """
+ self.assertEqual(self.f.parent, self.f)
+ g = self.f.create_group('a')
+ g2 = self.f.create_group('b')
+ self.assertEqual(g2.parent, g)
+ self.assertEqual(g.parent, self.f)
+
+
+
+
+
+
--
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