From 4e0381e5f9d00bc94bc169d1c4c6f8f420c889aa Mon Sep 17 00:00:00 2001 From: Manuel Guenther <manuel.guenther@idiap.ch> Date: Wed, 28 May 2014 10:04:48 +0200 Subject: [PATCH] Made new HDF5File tests python2.6 compatible. --- bob/io/base/test_hdf5.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bob/io/base/test_hdf5.py b/bob/io/base/test_hdf5.py index 91ffb30..dfd2da2 100644 --- a/bob/io/base/test_hdf5.py +++ b/bob/io/base/test_hdf5.py @@ -420,14 +420,17 @@ def test_close(): outfile = HDF5File(tmpname, 'w') outfile.close() - with nose.tools.assert_raises(RuntimeError): + def test_set(): outfile.set("Test", numpy.array([1,2])) + nose.tools.assert_raises(RuntimeError, test_set) - with nose.tools.assert_raises(RuntimeError): + def test_read(): test = outfile.read("Test") + nose.tools.assert_raises(RuntimeError, test_read) - with nose.tools.assert_raises(RuntimeError): - outfile.filename + def test_filename(): + fn = outfile.filename + nose.tools.assert_raises(RuntimeError, test_filename) finally: os.unlink(tmpname) -- GitLab