Mercurial > public > mercurial-scm > python-hglib
comparison tests/test-context.py @ 110:c635e6e7054f 0.9
context: raise same error when not found for all hg versions
hg log behavior changed, so modify context constructor to account for this
author | Alexander Plavin <me@aplavin.ru> |
---|---|
date | Fri, 26 Apr 2013 01:46:08 +0400 |
parents | bd23bc72e662 |
children | 27591b5bb9d9 |
comparison
equal
deleted
inserted
replaced
109:9324a89dd84e | 110:c635e6e7054f |
---|---|
1 from hglib.error import CommandError | |
1 import common, hglib | 2 import common, hglib |
2 from hglib import context | 3 from hglib import context |
3 | 4 |
4 class test_context(common.basetest): | 5 class test_context(common.basetest): |
5 def test_non_existent(self): | 6 def test_non_existent(self): |
6 self.assertRaises(ValueError, context.changectx, self.client, 'foo') | 7 self.assertRaisesRegexp(ValueError, 'not found', context.changectx, self.client, 'foo') |
7 | 8 |
8 def test_basic(self): | 9 def test_basic(self): |
9 self.append('a', 'a') | 10 self.append('a', 'a') |
10 self.append('b', 'b') | 11 self.append('b', 'b') |
11 rev0, node0 = self.client.commit('first', addremove=True) | 12 rev0, node0 = self.client.commit('first', addremove=True) |