~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 11:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220115714-2ru3hfappjweeg7q
Don't use no-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
"""Test "bzr init"""
 
18
"""Test 'bzr init'"""
19
19
 
20
20
import os
21
21
import re
22
22
 
23
23
from bzrlib import (
24
24
    branch as _mod_branch,
 
25
    config as _mod_config,
25
26
    osutils,
26
27
    urlutils,
27
28
    )
163
164
        self.run_bzr('init ../new/tree --create-prefix', working_dir='tree')
164
165
        self.failUnlessExists('new/tree/.bzr')
165
166
 
 
167
    def test_init_default_format_option(self):
 
168
        """bzr init should read default format from option default_format"""
 
169
        conf = _mod_config.GlobalConfig.from_string('''
 
170
[DEFAULT]
 
171
default_format = 1.9
 
172
''', save=True)
 
173
        out, err = self.run_bzr_subprocess('init')
 
174
        self.assertContainsRe(out, '1.9')
 
175
 
 
176
    def test_init_no_tree(self):
 
177
        """'bzr init --no-tree' creates a branch with no working tree."""
 
178
        out, err = self.run_bzr('init --no-tree')
 
179
        self.assertStartsWith(out, 'Created a standalone branch')
 
180
 
166
181
 
167
182
class TestSFTPInit(TestCaseWithSFTPServer):
168
183
 
216
231
        out, err = self.run_bzr(['init', 'foo'])
217
232
        self.assertEqual(err, '')
218
233
        self.assertTrue(os.path.exists('foo'))
 
234