From b29a6910f3cfa0ca6143965986e8b7f7d6a2e74a Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Wed, 27 Sep 2023 15:46:13 -0700 Subject: [PATCH] bug fix --- tests/unit/helpers/utils.py | 4 ++-- tests/unit/test_io_hdf5_h5tools.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/helpers/utils.py b/tests/unit/helpers/utils.py index 7e0de35e3..c38d2da15 100644 --- a/tests/unit/helpers/utils.py +++ b/tests/unit/helpers/utils.py @@ -207,7 +207,7 @@ def foo_ref_attr(self, value): raise ValueError("can't reset foo_ref_attr attribute") -def get_foo_buildmanager(): +def get_foo_buildmanager(dtype="int"): """ Get a BuildManager (and create all ObjectMappers) for a foofile :return: @@ -219,7 +219,7 @@ def get_foo_buildmanager(): datasets=[ DatasetSpec( "an example dataset", - "text", + dtype, name="my_data", attributes=[AttributeSpec("attr2", "an example integer attribute", "int")], ) diff --git a/tests/unit/test_io_hdf5_h5tools.py b/tests/unit/test_io_hdf5_h5tools.py index 520798eda..4ead1c7af 100644 --- a/tests/unit/test_io_hdf5_h5tools.py +++ b/tests/unit/test_io_hdf5_h5tools.py @@ -834,7 +834,7 @@ def test_roundtrip_TermSetWrapper_dataset(self): foobucket = FooBucket('bucket1', [foo]) foofile = FooFile(buckets=[foobucket]) - with HDF5IO(self.path, manager=get_foo_buildmanager(), mode='w', herd_path='./HERD.zip') as io: + with HDF5IO(self.path, manager=get_foo_buildmanager("text"), mode='w', herd_path='./HERD.zip') as io: io.write(foofile) with HDF5IO(self.path, manager=self.manager, mode='r') as io: