/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/per_repository_reference/test_all_revision_ids.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for all_revision_ids on a repository with external references."""
18
18
 
19
 
from bzrlib.tests.per_repository_reference import (
 
19
from breezy.tests.per_repository_reference import (
20
20
    TestCaseWithExternalReferenceRepository,
21
21
    )
22
22
 
32
32
        tree = self.make_branch_and_tree('base')
33
33
        revid = tree.commit('one')
34
34
        repo = self.make_referring('referring', tree.branch.repository)
35
 
        self.assertEqual(set([revid]), set(repo.all_revision_ids()))
 
35
        self.assertEqual({revid}, set(repo.all_revision_ids()))
36
36
 
37
37
    def test_all_revision_ids_from_repo(self):
38
38
        tree = self.make_branch_and_tree('spare')
40
40
        base = self.make_repository('base')
41
41
        repo = self.make_referring('referring', base)
42
42
        repo.fetch(tree.branch.repository, revid)
43
 
        self.assertEqual(set([revid]), set(repo.all_revision_ids()))
 
43
        self.assertEqual({revid}, set(repo.all_revision_ids()))
44
44
 
45
45
    def test_all_revision_ids_from_both(self):
46
46
        tree = self.make_branch_and_tree('spare')
49
49
        revid2 = base_tree.commit('two')
50
50
        repo = self.make_referring('referring', base_tree.branch.repository)
51
51
        repo.fetch(tree.branch.repository, revid)
52
 
        self.assertEqual(set([revid, revid2]), set(repo.all_revision_ids()))
 
52
        self.assertEqual({revid, revid2}, set(repo.all_revision_ids()))
53
53
 
54
54
    def test_duplicate_ids_do_not_affect_length(self):
55
55
        tree = self.make_branch_and_tree('spare')
58
58
        repo = self.make_referring('referring', base)
59
59
        repo.fetch(tree.branch.repository, revid)
60
60
        base.fetch(tree.branch.repository, revid)
61
 
        self.assertEqual(set([revid]), set(repo.all_revision_ids()))
 
61
        self.assertEqual({revid}, set(repo.all_revision_ids()))
62
62
        self.assertEqual(1, len(repo.all_revision_ids()))
63
63