~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-03 17:54:53 UTC
  • mfrom: (4669.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090903175453-3l05mwwkt0dwgees
(vila) Fix all known selftest leaks in /tmp

Show diffs side-by-side

added added

removed removed

Lines of Context:
503
503
            shelf_file.seek(0)
504
504
            unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
505
505
            unshelver.make_merger().do_merge()
 
506
            self.addCleanup(unshelver.finalize)
506
507
            self.assertFileEqual('bar', 'tree/foo')
507
508
        finally:
508
509
            shelf_file.close()
526
527
        self.build_tree_contents([('tree/foo', 'z\na\nb\nc\n')])
527
528
        shelf_file.seek(0)
528
529
        unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
 
530
        self.addCleanup(unshelver.finalize)
529
531
        unshelver.make_merger().do_merge()
530
532
        self.assertFileEqual('z\na\nb\nd\n', 'tree/foo')
531
533
 
554
556
        self.assertFileEqual('baz', 'tree/foo/bar')
555
557
        shelf_file.seek(0)
556
558
        unshelver = shelf.Unshelver.from_tree_and_shelf(tree, shelf_file)
 
559
        self.addCleanup(unshelver.finalize)
557
560
        unshelver.make_merger().do_merge()
558
561
        self.assertFalse('foo-id' in tree)
559
562
        self.assertFalse('bar-id' in tree)
699
702
        shelf_id = shelf_manager.shelve_changes(creator)
700
703
        self.failIfExists('tree/foo')
701
704
        unshelver = shelf_manager.get_unshelver(shelf_id)
 
705
        self.addCleanup(unshelver.finalize)
702
706
        unshelver.make_merger().do_merge()
703
707
        self.assertFileEqual('bar', 'tree/foo')
704
708