/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/test_reconcile.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-08 23:30:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170608233031-3qavls2o7a1pqllj
Update imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        child = bzrdir.BzrDirMetaFormat1().initialize('child')
39
39
        self.assertRaises(errors.NoRepositoryPresent, child.open_repository)
40
40
        reconciler = Reconciler(child)
41
 
        result = reconciler.reconcile()
 
41
        reconciler.reconcile()
42
42
        # smoke test for reconcile appears to work too.
43
43
        reconcile(child)
44
44
        # no inconsistent parents should have been found
45
45
        # but the values should have been set.
46
 
        self.assertEqual(0, result.inconsistent_parents)
 
46
        self.assertEqual(0, reconciler.inconsistent_parents)
47
47
        # and no garbage inventories
48
 
        self.assertEqual(0, result.garbage_inventories)
 
48
        self.assertEqual(0, reconciler.garbage_inventories)
49
49
 
50
50
 
51
51
class TestReconciler(tests.TestCaseWithTransport):
52
52
 
53
53
    def test_reconciler_with_no_branch(self):
54
54
        repo = self.make_repository('repo')
55
 
        reconciler = Reconciler(repo.controldir)
56
 
        result = reconciler.reconcile()
 
55
        reconciler = Reconciler(repo.bzrdir)
 
56
        reconciler.reconcile()
57
57
        # no inconsistent parents should have been found
58
58
        # but the values should have been set.
59
 
        self.assertEqual(0, result.inconsistent_parents)
 
59
        self.assertEqual(0, reconciler.inconsistent_parents)
60
60
        # and no garbage inventories
61
 
        self.assertEqual(0, result.garbage_inventories)
62
 
        self.assertIs(None, result.fixed_branch_history)
 
61
        self.assertEqual(0, reconciler.garbage_inventories)
 
62
        self.assertIs(None, reconciler.fixed_branch_history)
63
63
 
64
64
    def test_reconciler_finds_branch(self):
65
65
        a_branch = self.make_branch('a_branch')
66
 
        reconciler = Reconciler(a_branch.controldir)
67
 
        result = reconciler.reconcile()
 
66
        reconciler = Reconciler(a_branch.bzrdir)
 
67
        reconciler.reconcile()
68
68
 
69
69
        # It should have checked the repository, and the branch
70
 
        self.assertEqual(0, result.inconsistent_parents)
71
 
        self.assertEqual(0, result.garbage_inventories)
72
 
        self.assertIs(False, result.fixed_branch_history)
 
70
        self.assertEqual(0, reconciler.inconsistent_parents)
 
71
        self.assertEqual(0, reconciler.garbage_inventories)
 
72
        self.assertIs(False, reconciler.fixed_branch_history)