1
For things to do in Bazaar development, see
3
https://bugs.launchpad.net/bzr/
4
https://blueprints.launchpad.net/bzr/
1
. Create low-level hook to check locking
2
. Create higher-level hook to check locking (lifeless)
3
. Create documentation to explain hooking into locking info, à la:
4
Testing locking behaviour
5
-------------------------
7
You may want to write tests that particular objects are or aren't locked
8
during particular operations: see for example `bug 498409`__.
10
__ https://launchpad.net/bugs/498409
12
The `TestCase` base class registers hooks that record lock actions into
13
``._lock_actions`` in this format::
16
('acquired', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/branch-lockc4au55ppz8wdym11z1aq)),
17
('released', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/branch-lockc4au55ppz8wdym11z1aq)),
18
('acquired', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/repository/lockyxb3rn4sw1oyx1jzkt45)),
19
('released', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/repository/lockyxb3rn4sw1oyx1jzkt45)),
20
('acquired', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/branch/lockh8c6t28rcjdkgxtndbje)),
21
('released', LockResult(file:///tmp/testbzr-J2pcy2.tmp/.bzr/branch/lockh8c6t28rcjdkgxtndbje)),
24
Alternatively you can register your own hooks to make custom assertions:
25
see `TestCase._check_locks` for an example.