~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2009-07-27 06:28:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4587.
  • Revision ID: mbp@sourcefrog.net-20090727062835-o66p8it658tq1sma
Add CountedLock.get_physical_lock_status

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009 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
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
"""Test "bzr init"""
49
49
            out)
50
50
        self.assertEqual('', err)
51
51
 
 
52
    def test_init_format_2a(self):
 
53
        """Smoke test for constructing a format 2a repoistory."""
 
54
        out, err = self.run_bzr('init --format=2a')
 
55
        self.assertEqual("""Created a standalone tree (format: 2a)\n""",
 
56
            out)
 
57
        self.assertEqual('', err)
 
58
 
52
59
    def test_init_at_repository_root(self):
53
60
        # bzr init at the root of a repository should create a branch
54
61
        # and working tree even when creation of working trees is disabled.
81
88
            out)
82
89
        self.assertEqual('', err)
83
90
        WorkingTree.open('subdir1')
84
 
        
 
91
 
85
92
        self.run_bzr_error(['Parent directory of subdir2/nothere does not exist'],
86
93
                            'init subdir2/nothere')
87
94
        out, err = self.run_bzr('init subdir2/nothere', retcode=3)
88
95
        self.assertEqual('', out)
89
 
        
 
96
 
90
97
        os.mkdir('subdir2')
91
98
        out, err = self.run_bzr('init subdir2')
92
99
        self.assertEqual("""Created a standalone tree (format: pack-0.92)\n""",