Mercurial > python-hglib
changeset 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 | 838c5a91ed44 |
children | df808f92c0f1 |
files | tests/test-hidden.py tests/test-phase.py |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hidden.py Thu Jul 31 15:30:51 2014 -0500 +++ b/tests/test-hidden.py Thu Jul 31 15:49:00 2014 -0500 @@ -9,8 +9,8 @@ f.close() self.client.add('gna1') cs = self.client.commit('gna1')[1] #get id - with self.assertRaises(CommandError): - self.client.rawcommand(['debugobsolete', cs]) + self.assertRaises(CommandError, + self.client.rawcommand, ['debugobsolete', cs]) class test_obsolete_baselib(common.basetest):
--- 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]