comparison tests/test-context.py @ 113:27591b5bb9d9

tests: remove usage of assertRaisesRegexp Usage of assertRaisesRegexp caused tests to fail on python versions prior to 2.7
author Alexander Plavin <me@aplavin.ru>
date Thu, 02 May 2013 22:11:16 +0400
parents c635e6e7054f
children e05b0cf920bb
comparison
equal deleted inserted replaced
112:6190432f1d39 113:27591b5bb9d9
2 import common, hglib 2 import common, hglib
3 from hglib import context 3 from hglib import context
4 4
5 class test_context(common.basetest): 5 class test_context(common.basetest):
6 def test_non_existent(self): 6 def test_non_existent(self):
7 self.assertRaisesRegexp(ValueError, 'not found', context.changectx, self.client, 'foo') 7 self.assertRaises(ValueError, context.changectx, self.client, 'foo')
8 8
9 def test_basic(self): 9 def test_basic(self):
10 self.append('a', 'a') 10 self.append('a', 'a')
11 self.append('b', 'b') 11 self.append('b', 'b')
12 rev0, node0 = self.client.commit('first', addremove=True) 12 rev0, node0 = self.client.commit('first', addremove=True)