~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-01-27 20:24:43 UTC
  • mfrom: (3960.2.1 1.12-progress-warnings)
  • Revision ID: pqm@pqm.ubuntu.com-20090127202443-ty2bu1hh91dumasz
(jam) Avoid getting a UserWarning by not creating an unused progress
        bar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        err = self.run_bzr('shelve --list')[1]
27
27
        self.assertEqual('No shelved changes.\n', err)
28
28
 
29
 
    def make_creator(self, tree):
30
 
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
31
 
        self.addCleanup(creator.finalize)
32
 
        return creator
33
 
 
34
29
    def test_shelve_one(self):
35
30
        tree = self.make_branch_and_tree('.')
36
 
        creator = self.make_creator(tree)
 
31
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
37
32
        shelf_id = tree.get_shelf_manager().shelve_changes(creator, 'Foo')
38
33
        out, err = self.run_bzr('shelve --list', retcode=1)
39
34
        self.assertEqual('', err)
41
36
 
42
37
    def test_shelve_no_message(self):
43
38
        tree = self.make_branch_and_tree('.')
44
 
        creator = self.make_creator(tree)
 
39
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
45
40
        shelf_id = tree.get_shelf_manager().shelve_changes(creator)
46
41
        out, err = self.run_bzr('shelve --list', retcode=1)
47
42
        self.assertEqual('', err)
49
44
 
50
45
    def test_shelf_order(self):
51
46
        tree = self.make_branch_and_tree('.')
52
 
        creator = self.make_creator(tree)
 
47
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
53
48
        tree.get_shelf_manager().shelve_changes(creator, 'Foo')
54
 
        creator = self.make_creator(tree)
 
49
        creator = shelf.ShelfCreator(tree, tree.basis_tree(), [])
55
50
        tree.get_shelf_manager().shelve_changes(creator, 'Bar')
56
51
        out, err = self.run_bzr('shelve --list', retcode=1)
57
52
        self.assertEqual('', err)