~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_upgrade.py

  • Committer: Vincent Ladeuil
  • Date: 2008-01-29 08:40:53 UTC
  • mto: (3206.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3207.
  • Revision ID: v.ladeuil+lp@free.fr-20080129084053-sunwf549ox6zczqr
Fix two more leaked log files.

* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox.tearDown): Call the base class tearDown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
            'mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd'])
68
68
        rt = b.repository.revision_tree(rh[0])
69
69
        foo_id = 'foo-20051004035605-91e788d1875603ae'
70
 
        eq(rt.get_file_text(foo_id), 'initial contents\n')
 
70
        rt.lock_read()
 
71
        try:
 
72
            eq(rt.get_file_text(foo_id), 'initial contents\n')
 
73
        finally:
 
74
            rt.unlock()
71
75
        rt = b.repository.revision_tree(rh[1])
72
 
        eq(rt.get_file_text(foo_id), 'new contents\n')
 
76
        rt.lock_read()
 
77
        try:
 
78
            eq(rt.get_file_text(foo_id), 'new contents\n')
 
79
        finally:
 
80
            rt.unlock()
73
81
        # check a backup was made:
74
82
        transport = get_transport(b.base)
75
83
        transport.stat('.bzr.backup')
125
133
        self.assertNotEqual(old_repo_format.__class__, repo._format.__class__)
126
134
        # and we should be able to read the names for the file id 
127
135
        # 'dir-20051005095101-da1441ea3fa6917a'
 
136
        repo.lock_read()
 
137
        self.addCleanup(repo.unlock)
128
138
        self.assertNotEqual(
129
139
            [],
130
140
            repo.weave_store.get_weave(
131
141
                'dir-20051005095101-da1441ea3fa6917a',
132
 
                repo.get_transaction()))
 
142
                repo.get_transaction()).versions())
133
143
 
134
144
    def test_upgrade_to_meta_sets_workingtree_last_revision(self):
135
145
        self.build_tree_contents(_upgrade_dir_template)