test_dims_dimensionproxy.py 591 B

12345678910111213141516171819202122
  1. # This file is part of h5py, a Python interface to the HDF5 library.
  2. #
  3. # http://www.h5py.org
  4. #
  5. # Copyright 2008-2013 Andrew Collette and contributors
  6. #
  7. # License: Standard 3-clause BSD; see "license.txt" for full license terms
  8. # and contributor agreement.
  9. """
  10. Tests the h5py.Dataset.dims.DimensionProxy class.
  11. """
  12. from .common import TestCase, make_name
  13. class TestItems(TestCase):
  14. def test_empty(self):
  15. """ no dimension scales -> empty list """
  16. dset = self.f.create_dataset(make_name(), (10,), "f4")
  17. self.assertEqual(dset.dims[0].items(), [])