diff 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
line wrap: on
line diff
--- a/tests/test-context.py	Tue Apr 23 22:11:26 2013 +0200
+++ b/tests/test-context.py	Fri Apr 26 01:46:08 2013 +0400
@@ -1,9 +1,10 @@
+from hglib.error import CommandError
 import common, hglib
 from hglib import context
 
 class test_context(common.basetest):
     def test_non_existent(self):
-        self.assertRaises(ValueError, context.changectx, self.client, 'foo')
+        self.assertRaisesRegexp(ValueError, 'not found', context.changectx, self.client, 'foo')
 
     def test_basic(self):
         self.append('a', 'a')