/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Jonathan Lange
  • Date: 2009-12-09 09:20:42 UTC
  • mfrom: (4881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4907.
  • Revision ID: jml@canonical.com-20091209092042-s2zgqcf8f39yzxpj
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    )
45
45
from bzrlib.branch import Branch
46
46
from bzrlib.errors import BzrCommandError
47
 
from bzrlib.osutils import (
48
 
    has_symlinks,
49
 
    pathjoin,
50
 
    terminal_width,
51
 
    )
52
47
from bzrlib.tests.http_utils import TestCaseWithWebserver
53
48
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
54
49
from bzrlib.tests.blackbox import ExternalBase
87
82
        os.rmdir('revertdir')
88
83
        self.run_bzr('revert')
89
84
 
90
 
        if has_symlinks():
 
85
        if osutils.has_symlinks():
91
86
            os.symlink('/unlikely/to/exist', 'symlink')
92
87
            self.run_bzr('add symlink')
93
88
            self.run_bzr('commit -m f')
112
107
        self.run_bzr('revert')
113
108
        os.chdir('..')
114
109
 
115
 
    def test_main_version(self):
116
 
        """Check output from version command and master option is reasonable"""
117
 
        # output is intentionally passed through to stdout so that we
118
 
        # can see the version being tested
119
 
        output = self.run_bzr('version')[0]
120
 
        self.log('bzr version output:')
121
 
        self.log(output)
122
 
        self.assert_(output.startswith('Bazaar (bzr) '))
123
 
        self.assertNotEqual(output.index('Canonical'), -1)
124
 
        # make sure --version is consistent
125
 
        tmp_output = self.run_bzr('--version')[0]
126
 
        self.assertEquals(output, tmp_output)
127
 
 
128
110
    def example_branch(test):
129
111
        test.run_bzr('init')
130
112
        file('hello', 'wt').write('foo')
387
369
        self.run_bzr('init')
388
370
 
389
371
        self.assertIsSameRealPath(self.run_bzr('root')[0].rstrip(),
390
 
                                  pathjoin(self.test_dir, 'branch1'))
 
372
                                  osutils.pathjoin(self.test_dir, 'branch1'))
391
373
 
392
374
        progress("status of new file")
393
375
 
456
438
 
457
439
        log_out = self.run_bzr('log --line')[0]
458
440
        # determine the widest line we want
459
 
        max_width = terminal_width() - 1
460
 
        for line in log_out.splitlines():
461
 
            self.assert_(len(line) <= max_width, len(line))
 
441
        max_width = osutils.terminal_width()
 
442
        if max_width is not None:
 
443
            for line in log_out.splitlines():
 
444
                self.assert_(len(line) <= max_width - 1, len(line))
462
445
        self.assert_("this is my new commit and" not in log_out)
463
446
        self.assert_("this is my new commit" in log_out)
464
447
 
475
458
 
476
459
        self.run_bzr('info')
477
460
 
478
 
        if has_symlinks():
 
461
        if osutils.has_symlinks():
479
462
            progress("symlinks")
480
463
            mkdir('symlinks')
481
464
            chdir('symlinks')