~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_reconcile.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-06 03:15:29 UTC
  • mfrom: (1711.2.78 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060706031529-e189d8c3f42076be
(jam) allow plugins to include benchmarks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006 by Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
19
19
 
20
20
import bzrlib
21
21
import bzrlib.bzrdir as bzrdir
22
 
from bzrlib.inventory import Inventory
23
22
import bzrlib.repository as repository
24
23
from bzrlib.tests import TestCaseWithTransport
25
 
from bzrlib.tests import TestUIFactory
 
24
from bzrlib.tests.blackbox import TestUIFactory
26
25
from bzrlib.transport import get_transport
27
26
import bzrlib.ui as ui
28
27
 
41
40
 
42
41
    def test_trivial_reconcile(self):
43
42
        t = bzrdir.BzrDir.create_standalone_workingtree('.')
44
 
        (out, err) = self.run_bzr('reconcile')
 
43
        (out, err) = self.run_bzr_captured(['reconcile'])
45
44
        self.assertEqualDiff(out, "Reconciling repository %s\n"
46
45
                                  "Inventory ok.\n"
47
46
                                  "Reconciliation complete.\n" %
52
51
        t = bzrdir.BzrDir.create_standalone_workingtree('.')
53
52
        # an empty inventory with no revision will trigger reconciliation.
54
53
        repo = t.branch.repository
55
 
        inv = Inventory(revision_id='missing')
56
 
        inv.root.revision='missing'
 
54
        inv = bzrlib.tree.EmptyTree().inventory
57
55
        repo.add_inventory('missing', inv, [])
58
 
        (out, err) = self.run_bzr('reconcile')
 
56
        (out, err) = self.run_bzr_captured(['reconcile'])
59
57
        self.assertEqualDiff(out, "Reconciling repository %s\n"
60
58
                                  "Backup Inventory created.\n"
61
59
                                  "Inventory regenerated.\n"