| Index: tests/scm_unittest.py
|
| diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
|
| index d4270bd1ddbdb12ffa0181dbcd7e48938a6542d7..d2acc04b9e637b99737474a17631c8679a08d2f5 100755
|
| --- a/tests/scm_unittest.py
|
| +++ b/tests/scm_unittest.py
|
| @@ -9,12 +9,22 @@ from shutil import rmtree
|
| import tempfile
|
|
|
| # Fixes include path.
|
| -from super_mox import mox, SuperMoxBaseTestBase
|
| +from super_mox import mox, SuperMoxBaseTestBase, SuperMoxTestBase
|
|
|
| -from gclient_test import BaseTestCase
|
| import scm
|
|
|
|
|
| +class BaseTestCase(SuperMoxTestBase):
|
| + # Like unittest's assertRaises, but checks for Gclient.Error.
|
| + def assertRaisesError(self, msg, fn, *args, **kwargs):
|
| + try:
|
| + fn(*args, **kwargs)
|
| + except scm.gclient_utils.Error, e:
|
| + self.assertEquals(e.args[0], msg)
|
| + else:
|
| + self.fail('%s not raised' % msg)
|
| +
|
| +
|
| class BaseSCMTestCase(BaseTestCase):
|
| def setUp(self):
|
| BaseTestCase.setUp(self)
|
|
|