/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_lockdir.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import time
21
21
 
22
22
import breezy
23
 
from breezy import (
 
23
from .. import (
24
24
    config,
25
25
    errors,
26
26
    lock,
29
29
    tests,
30
30
    transport,
31
31
    )
32
 
from breezy.errors import (
 
32
from ..errors import (
33
33
    LockBreakMismatch,
34
34
    LockBroken,
35
35
    LockContention,
36
36
    LockFailed,
37
37
    LockNotHeld,
38
38
    )
39
 
from breezy.lockdir import (
 
39
from ..lockdir import (
40
40
    LockDir,
41
41
    LockHeldInfo,
42
42
    )
43
 
from breezy.tests import (
 
43
from . import (
44
44
    features,
45
45
    TestCase,
46
46
    TestCaseInTempDir,
132
132
            # a single process are not detected
133
133
            lf2.attempt_lock()
134
134
            self.fail('Failed to detect lock collision')
135
 
        except LockContention, e:
 
135
        except LockContention as e:
136
136
            self.assertEqual(e.lock, lf2)
137
137
            self.assertContainsRe(str(e),
138
138
                    r'^Could not acquire.*test_lock.*$')
148
148
        # lock is held, should get some info on it
149
149
        info1 = lf1.peek()
150
150
        self.assertEqual(set(info1.info_dict.keys()),
151
 
            set(['user', 'nonce', 'hostname', 'pid', 'start_time']))
 
151
            {'user', 'nonce', 'hostname', 'pid', 'start_time'})
152
152
        # should get the same info if we look at it through a different
153
153
        # instance
154
154
        info2 = LockDir(t, 'test_lock').peek()