~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

Don't use a test attribute for orig_get_transport.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2438
2438
        super(TestCaseWithMemoryTransport, self).setUp()
2439
2439
        # Ensure that ConnectedTransport doesn't leak sockets
2440
2440
        def get_transport_with_cleanup(*args, **kwargs):
2441
 
            t = self._orig_get_transport(*args, **kwargs)
 
2441
            t = orig_get_transport(*args, **kwargs)
2442
2442
            if isinstance(t, _mod_transport.ConnectedTransport):
2443
2443
                self.addCleanup(t.disconnect)
2444
2444
            return t
2445
2445
 
2446
 
        self._orig_get_transport = self.overrideAttr(
2447
 
            _mod_transport, 'get_transport', get_transport_with_cleanup)
 
2446
        orig_get_transport = self.overrideAttr(_mod_transport, 'get_transport',
 
2447
                                               get_transport_with_cleanup)
2448
2448
        self._make_test_root()
2449
2449
        self.addCleanup(os.chdir, os.getcwdu())
2450
2450
        self.makeAndChdirToTestDir()