~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Fix test failure on alpha by correcting format string for
 gc_chk_sha1_record (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        self.assertIsDirectory('.bzr/checkout', t)
48
48
        self.assertIsDirectory('.bzr/checkout/lock', t)
49
49
 
 
50
    def test_init_weave(self):
 
51
        # --format=weave should be accepted to allow interoperation with
 
52
        # old releases when desired.
 
53
        out, err = self.run_bzr('init --format=weave')
 
54
        self.assertEqual("""Created a standalone tree (format: weave)\n""",
 
55
            out)
 
56
        self.assertEqual('', err)
 
57
 
50
58
    def test_init_format_2a(self):
51
59
        """Smoke test for constructing a format 2a repoistory."""
52
60
        out, err = self.run_bzr('init --format=2a')
100
108
        # init an existing branch.
101
109
        out, err = self.run_bzr('init subdir2', retcode=3)
102
110
        self.assertEqual('', out)
103
 
        self.assertTrue(err.startswith('bzr: ERROR: Already a branch:'))
 
111
        self.failUnless(err.startswith('bzr: ERROR: Already a branch:'))
104
112
 
105
113
    def test_init_branch_quiet(self):
106
114
        out, err = self.run_bzr('init -q')
154
162
        self.run_bzr_error(['Parent directory of ../new/tree does not exist'],
155
163
                            'init ../new/tree', working_dir='tree')
156
164
        self.run_bzr('init ../new/tree --create-prefix', working_dir='tree')
157
 
        self.assertPathExists('new/tree/.bzr')
 
165
        self.failUnlessExists('new/tree/.bzr')
158
166
 
159
167
    def test_init_default_format_option(self):
160
168
        """bzr init should read default format from option default_format"""
203
211
    def test_init_append_revisions_only(self):
204
212
        self.run_bzr('init --dirstate-tags normal_branch6')
205
213
        branch = _mod_branch.Branch.open('normal_branch6')
206
 
        self.assertEqual(None, branch.get_append_revisions_only())
 
214
        self.assertEqual(None, branch._get_append_revisions_only())
207
215
        self.run_bzr('init --append-revisions-only --dirstate-tags branch6')
208
216
        branch = _mod_branch.Branch.open('branch6')
209
 
        self.assertEqual(True, branch.get_append_revisions_only())
 
217
        self.assertEqual(True, branch._get_append_revisions_only())
210
218
        self.run_bzr_error(['cannot be set to append-revisions-only'],
211
219
                           'init --append-revisions-only --knit knit')
212
220