/usr/lib/python3/dist-packages/h5py/tests/old/test_h5.py is in python3-h5py 2.7.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.
from __future__ import absolute_import
try:
import unittest2 as ut
except ImportError:
import unittest as ut
from h5py import h5
def fixnames():
cfg = h5.get_config()
cfg.complex_names = ('r','i')
class TestH5(ut.TestCase):
def test_config(self):
cfg = h5.get_config()
self.assertIsInstance(cfg, h5.H5PYConfig)
cfg2 = h5.get_config()
self.assertIs(cfg, cfg2)
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 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_repr(self):
cfg = h5.get_config()
repr(cfg)
|