Skip to content

Commit

Permalink
Update test_conventions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasprobst committed Mar 14, 2024
1 parent 6dd3d3e commit 9555bfd
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions tests/conventions/test_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9555bfd

Please sign in to comment.