~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_request.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-07-13 19:02:12 UTC
  • mfrom: (4986.2.8 deprecation)
  • Revision ID: pqm@pqm.ubuntu.com-20100713190212-bnayd5moplwtxhhb
(mbp) change some test tearDowns to addCleanup or overrideAttr (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
 
188
188
class TestJailHook(TestCaseWithMemoryTransport):
189
189
 
190
 
    def tearDown(self):
191
 
        request.jail_info.transports = None
192
 
        TestCaseWithMemoryTransport.tearDown(self)
 
190
    def setUp(self):
 
191
        super(TestJailHook, self).setUp()
 
192
        def clear_jail_info():
 
193
            request.jail_info.transports = None
 
194
        self.addCleanup(clear_jail_info)
193
195
 
194
196
    def test_jail_hook(self):
195
197
        request.jail_info.transports = None