~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2009-05-05 15:31:34 UTC
  • mto: (4343.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4344.
  • Revision ID: v.ladeuil+lp@free.fr-20090505153134-q4bp4is9gywsmzrv
Clean up test for log formats.

* bzrlib/tests/blackbox/test_logformats.py:
Update tests to actual style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from bzrlib.branch import (
24
24
    Branch,
25
 
    InterBranch,
26
25
    )
27
26
from bzrlib.bzrdir import (
28
27
    BzrDirFormat,
39
38
    )
40
39
from bzrlib.tests.test_foreign import (
41
40
    DummyForeignVcsDirFormat,
42
 
    InterToDummyVcsBranch,
43
41
    )
44
42
 
45
43
 
47
45
 
48
46
    def setUp(self):
49
47
        BzrDirFormat.register_control_format(DummyForeignVcsDirFormat)
50
 
        InterBranch.register_optimiser(InterToDummyVcsBranch)
51
48
        self.addCleanup(self.unregister_format)
52
49
        super(TestDpush, self).setUp()
53
50
 
56
53
            BzrDirFormat.unregister_control_format(DummyForeignVcsDirFormat)
57
54
        except ValueError:
58
55
            pass
59
 
        InterBranch.unregister_optimiser(InterToDummyVcsBranch)
60
56
 
61
57
    def make_dummy_builder(self, relpath):
62
58
        builder = self.make_branch_builder(relpath, 
71
67
        source_tree = self.make_branch_and_tree("dc")
72
68
        output, error = self.run_bzr("dpush -d dc dp", retcode=3)
73
69
        self.assertEquals("", output)
74
 
        self.assertContainsRe(error, 'in the same VCS, lossy push not necessary. Please use regular push.')
 
70
        self.assertContainsRe(error, 'not a foreign branch, use regular push')
75
71
 
76
72
    def test_dpush(self):
77
73
        branch = self.make_dummy_builder('d').get_branch()
80
76
        self.build_tree(("dc/foo", "blaaaa"))
81
77
        dc.open_workingtree().commit('msg')
82
78
 
83
 
        output, error = self.run_bzr("dpush -d dc d")
84
 
        self.assertEquals(error, "Pushed up to revision 2.\n")
 
79
        self.check_output("", "dpush -d dc d")
85
80
        self.check_output("", "status dc")
86
81
 
87
82
    def test_dpush_new(self):