[h5py] 367/455: Port H5T tests

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:51 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 0844847dfa97ab6dadf1149e63c02ffed5811e6a
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Wed Jan 20 01:18:19 2010 +0000

    Port H5T tests
---
 h5py/tests/test_h5t.py | 82 --------------------------------------------------
 1 file changed, 82 deletions(-)

diff --git a/h5py/tests/test_h5t.py b/h5py/tests/test_h5t.py
index c0e08c0..85a0cfe 100644
--- a/h5py/tests/test_h5t.py
+++ b/h5py/tests/test_h5t.py
@@ -65,19 +65,6 @@ class BaseTypeMixin(object):
 
     # --- End required attributes and methods ---
 
-    def test_equal(self):
-        """ Generic subtype equality test
-
-        Calls generate_type twice and compares the result.  Also compares to
-        an known type which which should not match.
-        """
-        a1, a2 = self.get_example_type(), self.get_example_type()
-        self.assert_(a1.equal(a2))
-        self.assert_(a2.equal(a1))
-        self.assert_(a1.equal(a1))
-        self.assert_(a1 == a2)
-        self.assert_(not a1 == self.ODDBALL_TYPE)
-
     @api_18
     def test_serialize(self):
         """ Generic subtype serialization test
@@ -108,11 +95,6 @@ class BaseTypeMixin(object):
         htype2 = h5t.open(fid, "name")
         self.assertEqual(htype, htype2)
 
-    def test_class(self):
-        """ Generic subtype class code test
-        """
-        self.assertEqual(self.get_example_type().get_class(), self.CLASSCODE)
-
 class TestInteger(TestCasePlus, BaseTypeMixin):
 
     CLASSCODE = h5t.INTEGER
@@ -171,70 +153,6 @@ class TestOpaque(TestCasePlus, BaseTypeMixin):
 
 class TestH5T(TestCasePlus):
 
-    def test_create(self):
-        """ Check that it produces instances from typecodes """
-
-        types = {h5t.COMPOUND: h5t.TypeCompoundID, h5t.OPAQUE: h5t.TypeOpaqueID}
-        sizes = (1,4,256)
-
-        def _t_create(typecode, size):
-            """ Core test """
-            htype=h5t.create(typecode, size)
-            self.assertEqual(type(htype), types[typecode])
-            self.assertEqual(htype.get_size(), size)
-
-        for typecode in types:
-            for size in sizes:
-                _t_create(typecode, size)
-        
-        self.assertRaises(ValueError, h5t.create, h5t.ARRAY, 4)
-    
-    def test_open_commit_committed(self):
-        """ Check that we can commit a named type and open it again """
-        plist = h5p.create(h5p.FILE_ACCESS)
-        plist.set_fclose_degree(h5f.CLOSE_STRONG)
-        fname = tempfile.mktemp('.hdf5')
-        fid = h5f.create(fname, h5f.ACC_TRUNC, fapl=plist)
-        try:
-            root = h5g.open(fid, '/')
-            htype = h5t.STD_I32LE.copy()
-            self.assert_(not htype.committed())
-            htype.commit(root, "NamedType")
-            self.assert_(htype.committed())
-            del htype
-            htype = h5t.open(root, "NamedType")
-            self.assert_(htype.equal(h5t.STD_I32LE))
-        finally:
-            fid.close()
-            os.unlink(fname)
-
-    def test_close(self):
-        """ Make sure that closing an object decrefs its identifier """
-        htype = h5t.STD_I32LE.copy()
-        self.assert_(htype)
-        htype._close()
-        self.assert_(not htype)
-
-    def test_copy(self):
-
-        def test(dt):
-            """ Test copying for the given NumPy dtype"""
-            htype = h5t.py_create(dtype(dt))
-            htype2 = htype.copy()
-            self.assertEqual(htype.dtype, htype2.dtype)
-            self.assert_(htype is not htype2)
-            self.assert_(htype == htype2)    
-
-        for x in simple_types:
-            test(x)
-
-    def test_lock(self):
-
-        htype = h5t.STD_I8LE.copy()
-        htype.set_sign(h5t.SGN_NONE)
-        htype.lock()
-        self.assertRaises(TypeError, htype.set_sign, h5t.SGN_2)
-
     def test_get_set_size(self):
 
         sizes = (1,2,3,4,127,128,129,133,16385)

-- 
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