Exemple #1
0
 def test_no_path(self, h5py_file_with_group):
     group = h5py_file_with_group["example"]
     link = HardLink(group)
     with pytest.raises(RuntimeError) as excinfo:
         link._set_file(h5py_file_with_group)
     assert (
         "No path defined for hard link." == str(excinfo.value)
     )
 def test_no_path(self, h5py_file_with_group):
     group = h5py_file_with_group["example"]
     link = HardLink(group)
     with pytest.raises(RuntimeError) as excinfo:
         link._set_file(h5py_file_with_group)
     assert ("No path defined for hard link." == str(excinfo.value))
 def test_set_file(self, h5py_file_with_group):
     link = HardLink("example")
     group = h5py_file_with_group["example"]
     link._set_file(h5py_file_with_group)
     assert link.h5py_obj == group
Exemple #4
0
 def test_set_file(self, h5py_file_with_group):
     link = HardLink("example")
     group = h5py_file_with_group["example"]
     link._set_file(h5py_file_with_group)
     assert link.h5py_obj == group