~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-10-18 21:34:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5509.
  • Revision ID: john@arbash-meinel.com-20101018213405-qn3biq5yu4i0axut
Fix bug #662053, 'bzr status' shouldn't fail
if the tree doesn't implement get_shelf_manager. Either that or
RevisionTree should be implementing it, but returning None, or something similar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
class BranchStatus(TestCaseWithTransport):
47
47
 
 
48
    def setUp(self):
 
49
        super(BranchStatus, self).setUp()
 
50
        # As TestCase.setUp clears all hooks, we install this default
 
51
        # post_status hook handler for the test.
 
52
        status.hooks.install_named_hook('post_status',
 
53
            status._show_shelve_summary,
 
54
            'bzr status')
 
55
 
48
56
    def assertStatus(self, expected_lines, working_tree,
49
57
        revision=None, short=False, pending=True, verbose=False):
50
58
        """Run status in working_tree and look for output.
530
538
        self.run_bzr(['shelve', '--all', '-m', 'foo'])
531
539
        self.build_tree(['bye.c'])
532
540
        wt.add('bye.c')
533
 
        # As TestCase.setUp clears all hooks, we install this default
534
 
        # post_status hook handler for the test.
535
 
        status.hooks.install_named_hook('post_status',
536
 
            status._show_shelve_summary,
537
 
            'bzr status')
538
541
        self.assertStatus([
539
542
                'added:\n',
540
543
                '  bye.c\n',