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

Unified Diff: tests/checkout_test.py

Issue 7192010: Fix Checkout.post_processsors setup. __init__() was ignoring the argument! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 6 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 | « checkout.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/checkout_test.py
diff --git a/tests/checkout_test.py b/tests/checkout_test.py
index 8c1fc2b1e21261e792cb8b042eed836d2d6d3cfd..a7c865758cc1d506af4b96a5b8c73218a047a18f 100755
--- a/tests/checkout_test.py
+++ b/tests/checkout_test.py
@@ -234,9 +234,11 @@ class BaseTest(fake_repos.FakeReposTestBase):
def _log(self):
raise NotImplementedError()
- def _test_process(self, co):
+ def _test_process(self, co_lambda):
"""Makes sure the process lambda is called correctly."""
- co.post_processors = [lambda *args: results.append(args)]
+ post_processors = [lambda *args: results.append(args)]
+ co = co_lambda(post_processors)
+ self.assertEquals(post_processors, co.post_processors)
co.prepare(None)
ps = self.get_patches()
results = []
@@ -395,10 +397,11 @@ class SvnCheckout(SvnBaseTest):
self.assertEquals('LF\n', out)
def testProcess(self):
- co = checkout.SvnCheckout(
+ co = lambda x: checkout.SvnCheckout(
self.root_dir, self.name,
None, None,
- self.svn_url)
+ self.svn_url,
+ x)
self._test_process(co)
def testPrepare(self):
@@ -475,10 +478,10 @@ class GitSvnCheckout(SvnBaseTest):
[patch.FilePatchDiff('svn_utils_test.txt', NAKED_PATCH, svn_props)])
def testProcess(self):
- co = checkout.SvnCheckout(
+ co = lambda x: checkout.SvnCheckout(
self.root_dir, self.name,
None, None,
- self.svn_url)
+ self.svn_url, x)
self._test_process(co)
def testPrepare(self):
@@ -549,10 +552,10 @@ class RawCheckout(SvnBaseTest):
'svn_utils_test.txt.rej\n')
def testProcess(self):
- co = checkout.SvnCheckout(
+ co = lambda x: checkout.SvnCheckout(
self.root_dir, self.name,
None, None,
- self.svn_url)
+ self.svn_url, x)
self._test_process(co)
def testPrepare(self):
« no previous file with comments | « checkout.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698