[PATCH hglib] tests: remove usage of assertRaisesRegexp

Alexander Plavin me at aplavin.ru
Thu May 2 16:18:51 CDT 2013


# HG changeset patch
# User Alexander Plavin <me at aplavin.ru>
# Date 1367518276 -14400
#      Thu May 02 22:11:16 2013 +0400
# Node ID 5347c16a690287f2849fbe47e2f12effe3f3d0b4
# Parent  c635e6e7054f2600d36343eaa1770cb36549382a
tests: remove usage of assertRaisesRegexp

Usage of assertRaisesRegexp caused tests to fail on python versions prior to 2.7

diff -r c635e6e7054f -r 5347c16a6902 tests/test-context.py
--- a/tests/test-context.py	Fri Apr 26 01:46:08 2013 +0400
+++ b/tests/test-context.py	Thu May 02 22:11:16 2013 +0400
@@ -4,7 +4,7 @@
 
 class test_context(common.basetest):
     def test_non_existent(self):
-        self.assertRaisesRegexp(ValueError, 'not found', context.changectx, self.client, 'foo')
+        self.assertRaises(ValueError, context.changectx, self.client, 'foo')
 
     def test_basic(self):
         self.append('a', 'a')


More information about the Mercurial-devel mailing list