Skip to content

Commit

Permalink
backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Aug 19, 2024
1 parent cb629ce commit c90cfa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions tests/unit/generic/test_datacontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,8 @@ def test_from_hdf_readonly(self):
self.hdf["read_only_from/READ_ONLY"] = True
with warnings.catch_warnings(record=True) as w:
pl.from_hdf(self.hdf, group_name="read_only_from")
self.assertEqual(
len(w),
2,
self.assertTrue(
len(w) <= 2,
"from_hdf on read_only DataContainer should not call _read_only_error.",
)
self.assertEqual(
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/storage/test_fileHDFio.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def test_rewrite_hdf5(self):
with self.assertLogs(logger=state.logger) as lw:
with warnings.catch_warnings(record=True) as w:
new_hdf.rewrite_hdf5(job_name="job_name")
self.assertEqual(len(w), 2)
self.assertTrue(len(w) <= 2)
self.assertEqual(
str(w[0].message),
"pyiron_base.storage.hdfio.rewrite_hdf5(job_name=job_name) "
Expand All @@ -428,7 +428,7 @@ def test_rewrite_hdf5(self):
with self.subTest("warning handling - deprecate exclude_groups"):
with warnings.catch_warnings(record=True) as w:
new_hdf.rewrite_hdf5(exclude_groups="some")
self.assertEqual(len(w), 2)
self.assertTrue(len(w) <= 2)
self.assertEqual(
str(w[0].message),
"pyiron_base.storage.hdfio.rewrite_hdf5(exclude_groups=some) "
Expand All @@ -438,7 +438,7 @@ def test_rewrite_hdf5(self):
with self.subTest("warning handling - deprecate exclude_nodes"):
with warnings.catch_warnings(record=True) as w:
new_hdf.rewrite_hdf5(exclude_nodes="any")
self.assertEqual(len(w), 2)
self.assertTrue(len(w) <= 2)
self.assertEqual(
str(w[0].message),
"pyiron_base.storage.hdfio.rewrite_hdf5(exclude_nodes=any) "
Expand Down

0 comments on commit c90cfa1

Please sign in to comment.