diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | obnamlib/hooks_tests.py | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -43,6 +43,9 @@ Bug fixes: * Will Dyson fixed a bug about locking while removing checkpoint generations. +* Michel Alexandre Salim fixed a Python 2.6 compatibility problem in + the unit tests (use of `assertRaises` as a context manager). + Version 1.8, released 2014-05-13 -------------------------------- diff --git a/obnamlib/hooks_tests.py b/obnamlib/hooks_tests.py index 99af37af..222b7413 100644 --- a/obnamlib/hooks_tests.py +++ b/obnamlib/hooks_tests.py @@ -129,8 +129,9 @@ class FilterHookTests(unittest.TestCase): self.assertEquals(self.hook.run_filter_read("base64\0AE9L"), "OK") def test_no_tag_raises_error(self): - with self.assertRaises(obnamlib.NoFilterTagError): - self.hook.run_filter_read('no NUL bytes in this string') + self.assertRaises(obnamlib.NoFilterTagError, + self.hook.run_filter_read, + 'no NUL bytes in this string') def test_missing_filter_raises(self): self.assertRaises(obnamlib.MissingFilterError, |