/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/per_pack_repository.py

  • Committer: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
                    repo.abort_write_group()
254
254
                    raise
255
255
                else:
256
 
                    old_names = repo._pack_collection._names.keys()
 
256
                    old_names = set(repo._pack_collection._names)
257
257
                    result = repo.commit_write_group()
258
 
                    cur_names = repo._pack_collection._names.keys()
259
 
                    new_names = list(set(cur_names) - set(old_names))
 
258
                    cur_names = set(repo._pack_collection._names)
 
259
                    # In this test, len(result) is always 1, so unordered is ok
 
260
                    new_names = list(cur_names - old_names)
260
261
                    self.assertEqual(new_names, result)
261
262
        finally:
262
263
            repo.unlock()