~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-04 10:59:49 UTC
  • mfrom: (4862.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091204105949-cp822ctg4bp7vgd4
(vila) BZR_COLUMNS can override terminal_width()

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')
374
369
        self.run_bzr('init')
375
370
 
376
371
        self.assertIsSameRealPath(self.run_bzr('root')[0].rstrip(),
377
 
                                  pathjoin(self.test_dir, 'branch1'))
 
372
                                  osutils.pathjoin(self.test_dir, 'branch1'))
378
373
 
379
374
        progress("status of new file")
380
375
 
443
438
 
444
439
        log_out = self.run_bzr('log --line')[0]
445
440
        # determine the widest line we want
446
 
        max_width = terminal_width() - 1
447
 
        for line in log_out.splitlines():
448
 
            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))
449
445
        self.assert_("this is my new commit and" not in log_out)
450
446
        self.assert_("this is my new commit" in log_out)
451
447
 
462
458
 
463
459
        self.run_bzr('info')
464
460
 
465
 
        if has_symlinks():
 
461
        if osutils.has_symlinks():
466
462
            progress("symlinks")
467
463
            mkdir('symlinks')
468
464
            chdir('symlinks')