~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockable_files.py

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
                                      _TestLockableFiles_mixin):
273
273
 
274
274
    def setUp(self):
275
 
        TestCaseInTempDir.setUp(self)
276
 
        t = transport.get_transport('.')
 
275
        super(TestLockableFiles_TransportLock, self).setUp()
 
276
        t = transport.get_transport_from_path('.')
277
277
        t.mkdir('.bzr')
278
278
        self.sub_transport = t.clone('.bzr')
279
279
        self.lockable = self.get_lockable()
293
293
 
294
294
 
295
295
class TestLockableFiles_LockDir(TestCaseInTempDir,
296
 
                              _TestLockableFiles_mixin):
 
296
                                _TestLockableFiles_mixin):
297
297
    """LockableFile tests run with LockDir underneath"""
298
298
 
299
299
    def setUp(self):
300
 
        TestCaseInTempDir.setUp(self)
301
 
        self.transport = transport.get_transport('.')
 
300
        super(TestLockableFiles_LockDir, self).setUp()
 
301
        self.transport = transport.get_transport_from_path('.')
302
302
        self.lockable = self.get_lockable()
303
303
        # the lock creation here sets mode - test_permissions on branch
304
304
        # tests that implicitly, but it might be a good idea to factor
329
329
 
330
330
 
331
331
class TestLockableFiles_RemoteLockDir(TestCaseWithSmartMedium,
332
 
                              _TestLockableFiles_mixin):
 
332
                                      _TestLockableFiles_mixin):
333
333
    """LockableFile tests run with RemoteLockDir on a branch."""
334
334
 
335
335
    def setUp(self):
336
 
        TestCaseWithSmartMedium.setUp(self)
 
336
        super(TestLockableFiles_RemoteLockDir, self).setUp()
337
337
        # can only get a RemoteLockDir with some RemoteObject...
338
338
        # use a branch as thats what we want. These mixin tests test the end
339
339
        # to end behaviour, so stubbing out the backend and simulating would
341
341
        # in test_remote and test_smart as usual.
342
342
        b = self.make_branch('foo')
343
343
        self.addCleanup(b.bzrdir.transport.disconnect)
344
 
        self.transport = transport.get_transport('.')
 
344
        self.transport = transport.get_transport_from_path('.')
345
345
        self.lockable = self.get_lockable()
346
346
 
347
347
    def get_lockable(self):