summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-12-06 18:54:57 +0200
committerLars Wirzenius <liw@liw.fi>2014-12-06 18:54:57 +0200
commitce0e45fece3dcec7faace976b30d99314f2d4c15 (patch)
tree56404344edca4c446f94cfca3b066b55b6a0d6b3
parent969cc090e766e36980a7f9f2503b328f6a4833ce (diff)
parentfa3de99d9183c64b32dcb9405e23541be85c60da (diff)
downloadobnam-ce0e45fece3dcec7faace976b30d99314f2d4c15.tar.gz
Merge fix for Python 2.6 compatibility
-rw-r--r--NEWS3
-rw-r--r--obnamlib/hooks_tests.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index e937e3f5..e538959a 100644
--- a/NEWS
+++ b/NEWS
@@ -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,