~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_bound_branches.py

  • Committer: John Arbash Meinel
  • Date: 2005-11-12 21:38:35 UTC
  • mto: (1587.1.6 bound-branches)
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: john@arbash-meinel.com-20051112213835-282bdea6a76e7230
Wrote a simple test which actually makes a branch become bound, and made it work

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        if loc is not None:
55
55
            os.chdir(cwd)
56
56
 
 
57
    def test_simple_binding(self):
 
58
        bzr = self.run_bzr
 
59
        self.build_tree(['base/', 'base/a', 'base/b'])
 
60
 
 
61
        os.chdir('base')
 
62
        bzr('init')
 
63
        bzr('add')
 
64
        bzr('commit', '-m', 'init')
 
65
 
 
66
        os.chdir('..')
 
67
        bzr('branch', 'base', 'child')
 
68
 
 
69
        os.chdir('child')
 
70
        bzr('bind', '../base')
 
71
 
 
72
        self.failUnlessExists('.bzr/bound')
 
73
 
57
74
    def test_bound_commit(self):
58
75
        bzr = self.run_bzr
59
76
        self.create_branches()
68
85
        os.chdir('../base')
69
86
        self.check_revno(2)
70
87
 
71
 
    def test_bound_fail(self)
 
88
    def test_bound_fail(self):
72
89
        """Make sure commit fails if out of date."""
73
90
        bzr = self.run_bzr
74
91
        self.create_branches()