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

Unified Diff: infra/libs/git2/test/ref_test.py

Issue 477623003: Add git subtree daemon service. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@add_dtree_support
Patch Set: address comments Created 6 years, 4 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 | « infra/libs/git2/repo.py ('k') | infra/services/gsubtreed/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/libs/git2/test/ref_test.py
diff --git a/infra/libs/git2/test/ref_test.py b/infra/libs/git2/test/ref_test.py
index fbd7af73498a73dbabd3ca43078ac0d81ef280b1..709f067d929ef667d5806ec40de2e91cb4a8c50e 100644
--- a/infra/libs/git2/test/ref_test.py
+++ b/infra/libs/git2/test/ref_test.py
@@ -61,3 +61,11 @@ class TestRef(test_util.TestBasis):
S = r.get_commit(self.repo['S'])
self.capture_stdio(O.update_to, S)
self.assertEqual(O.commit.hsh, self.repo['S'])
+
+ def testHash(self):
+ # ensure that Ref's can be used as keys in a dict
+ r = self.mkRepo()
+ mapping = {}
+ mapping[r['refs/heads/branch_O']] = True
+ mapping[r['refs/heads/branch_O']] = True
+ self.assertEqual(len(mapping), 1)
« no previous file with comments | « infra/libs/git2/repo.py ('k') | infra/services/gsubtreed/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698