217
217
b = branch.Branch.open('b')
218
218
self.assertEndsWith(b.get_bound_location(), '/a/')
220
def test_branch_with_post_branch_init_hook(self):
222
branch.Branch.hooks.install_named_hook('post_branch_init',
224
self.assertLength(0, calls)
225
self.example_branch('a')
226
self.assertLength(1, calls)
227
self.run_bzr('branch a b')
228
self.assertLength(2, calls)
230
def test_checkout_with_post_branch_init_hook(self):
232
branch.Branch.hooks.install_named_hook('post_branch_init',
234
self.assertLength(0, calls)
235
self.example_branch('a')
236
self.assertLength(1, calls)
237
self.run_bzr('checkout a b')
238
self.assertLength(2, calls)
240
def test_lightweight_checkout_with_post_branch_init_hook(self):
242
branch.Branch.hooks.install_named_hook('post_branch_init',
244
self.assertLength(0, calls)
245
self.example_branch('a')
246
self.assertLength(1, calls)
247
self.run_bzr('checkout --lightweight a b')
248
self.assertLength(2, calls)
221
251
class TestBranchStacked(ExternalBase):
222
252
"""Tests for branch --stacked"""