Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
robotics
embodied-ai
human-demonstration
egocentric-video
bimanual-manipulation
tactile-sensing
License:
Download player/runtime/python/Lib/site-packages/h5py/tests/test_h5o.py from alinarus/MultimodalData: direct link, hf CLI and curl.
- Browser
- Download file 542 Bytes
-
https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/h5py/tests/test_h5o.py
- Command line
-
hf download hf://datasets/alinarus/MultimodalData/player/runtime/python/Lib/site-packages/h5py/tests/test_h5o.py
-
curl -L -o test_h5o.py https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/h5py/tests/test_h5o.py
542 Bytes
| import pytest | |
| from .common import TestCase, make_name | |
| from h5py import File | |
| class SampleException(Exception): | |
| pass | |
| def throwing(name, obj): | |
| raise SampleException(f"throwing exception for {name} {obj}") | |
| class TestVisit(TestCase): | |
| def test_visit(self): | |
| fname = self.mktemp() | |
| fid = File(fname, 'w') | |
| fid.create_dataset(make_name(), (100,), dtype='uint8') | |
| with pytest.raises(SampleException, match='throwing exception'): | |
| fid.visititems(throwing) | |
| fid.close() | |