def test_cnames_get(self): cfg = h5.get_config() self.assertEqual(cfg.complex_names, ('r', 'i'))
def test_cnames_set(self): self.addCleanup(fixnames) cfg = h5.get_config() cfg.complex_names = ('q', 'x') self.assertEqual(cfg.complex_names, ('q', 'x'))
def fixnames(): cfg = h5.get_config() cfg.complex_names = ('r', 'i')
def test_config(self): cfg = h5.get_config() self.assertIsInstance(cfg, h5.H5PYConfig) cfg2 = h5.get_config() self.assertIs(cfg, cfg2)
def api_16(func): """Decorator to run test under HDF5 1.6 only""" if not h5.get_config().API_18: return func return None
def test_cnames_get(self): cfg = h5.get_config() self.assertEqual(cfg.complex_names, ("r", "i"))
def test_cnames_get(self): cfg = h5.get_config() self.assertEqual(cfg.complex_names, ('r','i'))
# # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. import weakref import sys import os from .base import HLObject, py3, phil, with_phil from .group import Group from h5py import h5, h5f, h5p, h5i, h5fd, h5t, _objects from h5py import version mpi = h5.get_config().mpi hdf5_version = version.hdf5_version_tuple[0:3] if mpi: import mpi4py libver_dict = {'earliest': h5f.LIBVER_EARLIEST, 'latest': h5f.LIBVER_LATEST} libver_dict_r = dict((y, x) for x, y in libver_dict.iteritems()) def make_fapl(driver, libver, **kwds): """ Set up a file access property list """ plist = h5p.create(h5p.FILE_ACCESS) if libver is not None: if libver in libver_dict:
def fixnames(): cfg = h5.get_config() cfg.complex_names = ('r','i')
def api_18(func): """Decorator to enable 1.8.X-only API functions""" if h5.get_config().API_18: return func return None
def test_cnames_set_exc(self): self.addCleanup(fixnames) cfg = h5.get_config() with self.assertRaises(TypeError): cfg.complex_names = ("q", "i", "v") self.assertEqual(cfg.complex_names, ("r", "i"))
def test_cnames_set_exc(self): self.addCleanup(fixnames) cfg = h5.get_config() with self.assertRaises(TypeError): cfg.complex_names = ('q', 'i', 'v') self.assertEqual(cfg.complex_names, ('r', 'i'))
def test_cnames_set(self): self.addCleanup(fixnames) cfg = h5.get_config() cfg.complex_names = ('q','x') self.assertEqual(cfg.complex_names, ('q','x'))
def test_repr(self): cfg = h5.get_config() repr(cfg)
def test_cnames_set_exc(self): self.addCleanup(fixnames) cfg = h5.get_config() with self.assertRaises(TypeError): cfg.complex_names = ('q','i','v') self.assertEqual(cfg.complex_names, ('r','i'))
# # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. import weakref import sys import os from .base import HLObject, py3 from .group import Group from h5py import h5, h5f, h5p, h5i, h5fd, h5t, _objects from h5py import version mpi = h5.get_config().mpi hdf5_version = version.hdf5_version_tuple[0:3] if mpi: import mpi4py libver_dict = {"earliest": h5f.LIBVER_EARLIEST, "latest": h5f.LIBVER_LATEST} libver_dict_r = dict((y, x) for x, y in libver_dict.items()) def make_fapl(driver, libver, **kwds): """ Set up a file access property list """ plist = h5p.create(h5p.FILE_ACCESS) plist.set_fclose_degree(h5f.CLOSE_STRONG) if libver is not None:
def fixnames(): cfg = h5.get_config() cfg.complex_names = ("r", "i")