Control: tags -1 patch

Hi Edward,

Quoting Drew Parsons:
 62s         """
 62s
 62s         # load data and try to directly modify 'type' and 'base_type' 
Attributes
 62s         # which will fail cause hdf5 file is opened for read only
 62s         h5_node = h5_data['somedata']
 62s         with pytest.raises(OSError):
 62s             try:
 62s >               h5_node.attrs['type'] = pickle.dumps(list)
 62s
 62s 
/tmp/autopkgtest-lxc.kwo7jiul/downtmp/build.aWU/src/hickle/tests/test_01_hickle_helpers.py:126:
 62s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _
...
 62s >   ???
62s E   KeyError: 'Unable to delete attribute (no write intent on file)'

This seems to have only changed the kind of error pytest is throwing, and I've 
attached a patch trivial fix.
Please consider to apply and upload soonish since hickle is the last package 
blocking the transition
of new h5py to testing (rest packages have been fixed).

Best,
Nilesh
--- a/hickle/tests/test_01_hickle_helpers.py
+++ b/hickle/tests/test_01_hickle_helpers.py
@@ -121,16 +121,16 @@
     # load data and try to directly modify 'type' and 'base_type' Attributes
     # which will fail cause hdf5 file is opened for read only
     h5_node = h5_data['somedata']
-    with pytest.raises(OSError):
+    with pytest.raises(KeyError):
         try:
             h5_node.attrs['type'] = pickle.dumps(list)
         except RuntimeError as re:
-            raise OSError(re).with_traceback(re.__traceback__)
-    with pytest.raises(OSError):
+            raise KeyError(re).with_traceback(re.__traceback__)
+    with pytest.raises(KeyError):
         try:
             h5_node.attrs['base_type'] = b'list'
         except RuntimeError as re:
-            raise OSError(re).with_traceback(re.__traceback__)
+            raise KeyError(re).with_traceback(re.__traceback__)
 
     # verify that 'type' expands to tuple before running
     # the remaining tests

Reply via email to