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

Unified Diff: tests/git_common_test.py

Issue 181043018: Add git thaw/freeze to depot_tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@git_map
Patch Set: fix space Created 6 years, 9 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 | « git_freezer.py ('k') | tests/git_freezer_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_common_test.py
diff --git a/tests/git_common_test.py b/tests/git_common_test.py
index 8ecf6a9932b3d537683261053fc2780909ebc07d..711543222734440c8b852ff3f3e6c284a7f5b489 100755
--- a/tests/git_common_test.py
+++ b/tests/git_common_test.py
@@ -128,7 +128,7 @@ class ProgressPrinterTest(GitCommonTestBase):
fmt = '%(count)d/10'
stream = self.FakeStream()
- pp = self.gc.ProgressPrinter(fmt, enabled=True, stream=stream, period=0.01)
+ pp = self.gc.ProgressPrinter(fmt, enabled=True, fout=stream, period=0.01)
with pp as inc:
for _ in xrange(10):
time.sleep(0.02)
@@ -190,6 +190,17 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
self.repo['D']
)
+ def testStream(self):
+ items = set(self.repo.commit_map.itervalues())
+
+ def testfn():
+ for line in self.gc.stream('log', '--format=%H').xreadlines():
+ line = line.strip()
+ self.assertIn(line, items)
+ items.remove(line)
+
+ self.repo.run(testfn)
+
def testCurrentBranch(self):
self.repo.git('checkout', 'branch_D')
self.assertEqual(self.repo.run(self.gc.current_branch), 'branch_D')
« no previous file with comments | « git_freezer.py ('k') | tests/git_freezer_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698