Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: tests/gclient_scm_test.py

Issue 2425003: Fix both gclient_scm_test.py and scm_unittest.py. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/scm_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_scm_test.py
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 20a4cbdb08263a0caedb33d8ffdfb7c84c589edd..4f8b656fb124f9e0de5b6bf7919908d1c583b76b 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -16,7 +16,17 @@ import __builtin__
from super_mox import mox, SuperMoxBaseTestBase, SuperMoxTestBase
import gclient_scm
-from gclient_test import BaseTestCase as GCBaseTestCase
+
+
+class GCBaseTestCase(SuperMoxTestBase):
+ # Like unittest's assertRaises, but checks for Gclient.Error.
+ def assertRaisesError(self, msg, fn, *args, **kwargs):
+ try:
+ fn(*args, **kwargs)
+ except gclient_scm.gclient_utils.Error, e:
+ self.assertEquals(e.args[0], msg)
+ else:
+ self.fail('%s not raised' % msg)
class BaseTestCase(GCBaseTestCase):
« no previous file with comments | « no previous file | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698