comparison tests/test_tags.py @ 832:e9af7eba88db

globally: clean up whitespace around operators and commas to conform with PEP8 Mostly autoformatted by Eclipse. A few manual corrections were performed where Eclipse's autoformatter did something non-idiomatic.
author Yonggang Luo <luoyonggang@gmail.com>
date Wed, 12 Oct 2011 15:35:25 +0800
parents 86d124a8768e
children 04729f3a3d17
comparison
equal deleted inserted replaced
831:be5bbb2f2d68 832:e9af7eba88db
136 self.assertEqual(len(repo.heads()), headcount) 136 self.assertEqual(len(repo.heads()), headcount)
137 heads = repo.heads() 137 heads = repo.heads()
138 openheads = [h for h in heads if not repo[h].extra().get('close', False)] 138 openheads = [h for h in heads if not repo[h].extra().get('close', False)]
139 closedheads = set(heads) - set(openheads) 139 closedheads = set(heads) - set(openheads)
140 self.assertEqual(len(openheads), 1) 140 self.assertEqual(len(openheads), 1)
141 self.assertEqual(len(closedheads), headcount-1) 141 self.assertEqual(len(closedheads), headcount - 1)
142 closedheads = sorted(list(closedheads), 142 closedheads = sorted(list(closedheads),
143 cmp=lambda x,y: cmp(repo[x].rev(), repo[y].rev())) 143 cmp=lambda x, y: cmp(repo[x].rev(), repo[y].rev()))
144 144
145 # closeme has no open heads 145 # closeme has no open heads
146 for h in openheads: 146 for h in openheads:
147 self.assertNotEqual('closeme', repo[openheads[0]].branch()) 147 self.assertNotEqual('closeme', repo[openheads[0]].branch())
148 148