From 9555bfd2182e8f251690acd8eac6dce1d8f88391 Mon Sep 17 00:00:00 2001 From: Matthias Probst Date: Thu, 14 Mar 2024 21:33:01 +0100 Subject: [PATCH] Update test_conventions.py --- tests/conventions/test_conventions.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/tests/conventions/test_conventions.py b/tests/conventions/test_conventions.py index a1f353a3..72b2d893 100644 --- a/tests/conventions/test_conventions.py +++ b/tests/conventions/test_conventions.py @@ -531,29 +531,6 @@ def test_from_zenodo(self): self.assertFalse('-' in sa) self.assertNotEqual(h5.standard_attributes['comment'].description, h5['test'].standard_attributes['comment'].description) - if False: - self.assertEqual(cv.name, 'h5rdmtoolbox-tutorial-convention') - self.assertEqual( - h5tbx.convention.standard_attributes.DefaultValue.EMPTY, - cv.properties[h5tbx.File]['data_type'].default_value - ) - cv.properties[h5tbx.File]['data_type'].make_optional() - self.assertEqual( - h5tbx.convention.standard_attributes.DefaultValue.NONE, - cv.properties[h5tbx.File]['data_type'].default_value - ) - - # we can download from zenodo by passing the short or full DOI or the URL: - - dois = ('10428822', '10.5281/zenodo.10428822', 'https://zenodo.org/record/10428822', - 'https://doi.org/10.5281/zenodo.10428822') - h5tbx.UserDir.clear_cache() - with self.assertRaises(ValueError): # because it is not a standard attribute YAML file! - cv = h5tbx.convention.from_zenodo(doi=10428795) - - for doi in dois: - cv = h5tbx.convention.from_zenodo(doi=doi) - self.assertEqual(cv.name, 'h5rdmtoolbox-tutorial-convention') def test_default_value(self): from h5rdmtoolbox.convention.consts import DefaultValue