diff tests/test-phase.py @ 129:bcc8390d7819

tests: remove "with" usage for 2.4 compatibility
author Matt Mackall <mpm@selenic.com>
date Thu, 31 Jul 2014 15:49:00 -0500
parents a7fe976b1931
children b6f601ba7f3c
line wrap: on
line diff
--- a/tests/test-phase.py	Thu Jul 31 15:30:51 2014 -0500
+++ b/tests/test-phase.py	Thu Jul 31 15:49:00 2014 -0500
@@ -23,8 +23,8 @@
         """test phase change from draft to secret"""
         self.append('a', 'a')
         rev, node0 = self.client.commit('first', addremove=True)
-        with self.assertRaises(hglib.error.CommandError):
-            self.client.phase(node0, secret=True)
+        self.assertRaises(hglib.error.CommandError,
+                          self.client.phase, node0, secret=True)
         self.client.phase(node0, secret=True, force=True)
         self.assertEqual([(0, 'secret')], self.client.phase(node0))
         ctx = self.client[rev]