comparison 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
comparison
equal deleted inserted replaced
128:838c5a91ed44 129:bcc8390d7819
21 21
22 def test_phase_secret(self): 22 def test_phase_secret(self):
23 """test phase change from draft to secret""" 23 """test phase change from draft to secret"""
24 self.append('a', 'a') 24 self.append('a', 'a')
25 rev, node0 = self.client.commit('first', addremove=True) 25 rev, node0 = self.client.commit('first', addremove=True)
26 with self.assertRaises(hglib.error.CommandError): 26 self.assertRaises(hglib.error.CommandError,
27 self.client.phase(node0, secret=True) 27 self.client.phase, node0, secret=True)
28 self.client.phase(node0, secret=True, force=True) 28 self.client.phase(node0, secret=True, force=True)
29 self.assertEqual([(0, 'secret')], self.client.phase(node0)) 29 self.assertEqual([(0, 'secret')], self.client.phase(node0))
30 ctx = self.client[rev] 30 ctx = self.client[rev]
31 self.assertEqual('secret', ctx.phase()) 31 self.assertEqual('secret', ctx.phase())
32 32