~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Patch Queue Manager
  • Date: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
from bzrlib.tests import (
44
44
    features,
45
45
    TestCase,
 
46
    TestCaseInTempDir,
46
47
    TestCaseWithTransport,
47
48
    )
48
49
 
432
433
        self.assertContainsRe(info_list['time_ago'], r'^\d+ seconds? ago$')
433
434
 
434
435
    def test_lock_without_email(self):
435
 
        global_config = config.GlobalConfig()
 
436
        global_config = config.GlobalStack()
436
437
        # Intentionally has no email address
437
 
        global_config.set_user_option('email', 'User Identity')
 
438
        global_config.set('email', 'User Identity')
438
439
        ld1 = self.get_lock()
439
440
        ld1.create()
440
441
        ld1.lock_write()
654
655
        self.assertEqual([], self._calls)
655
656
 
656
657
 
657
 
class TestLockHeldInfo(TestCase):
 
658
class TestLockHeldInfo(TestCaseInTempDir):
658
659
    """Can get information about the lock holder, and detect whether they're
659
660
    still alive."""
660
661
 
733
734
            lambda: 'aproperhostname')
734
735
        # This is off by default at present; see the discussion in the bug.
735
736
        # If you change the default, don't forget to update the docs.
736
 
        config.GlobalConfig().set_user_option('locks.steal_dead', True)
 
737
        config.GlobalStack().set('locks.steal_dead', True)
737
738
        # Create a lock pretending to come from a different nonexistent
738
739
        # process on the same machine.
739
740
        l1 = LockDir(self.get_transport(), 'a',