~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Andrew Starr-Bochicchio
  • Date: 2014-03-30 17:59:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6592.
  • Revision ID: a.starr.b@gmail.com-20140330175929-rd97jstcbau2j1gy
Use LooseVersion from distutils to check Cython version in order to handle non-integers in the version string.

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',