~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2007 Canonical Ltd
 
1
# Copyright (C) 2005-2010 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
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')