+
45 + def test_launchpad_branch_subdirectory(self):
46 + # lp-open in a subdirectory of a registered branch should work
47 + wt = self.make_branch_and_tree('lp')
48 + wt.branch.set_push_location(
49 + 'bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
50 + self.build_tree(['lp/a/'])
51 + os.chdir('lp/a')
52 + self.assertEqual(
53 + ['Opening https://code.edge.launchpad.net/~foo/bar/baz in web '
54 + 'browser'],
55 + self.run_open('.'))
^- did you need 'os.chdir()' rather than 'self.run_open('lp/a')' ?
Anyway, approve regardless, and I'll merge, but I prefer to avoid chdir when possible. (As it is changing global state, and is something we try not to do withing bzrlib. We certainly have tests that do it, but we've moved some of that out into run_bzr(working_dir=...))
+ branch_ subdirectory( self): branch_ and_tree( 'lp') set_push_ location( //bazaar. launchpad. net/~foo/ bar/baz' ) tree([' lp/a/'] ) /code.edge. launchpad. net/~foo/ bar/baz in web '
45 + def test_launchpad_
46 + # lp-open in a subdirectory of a registered branch should work
47 + wt = self.make_
48 + wt.branch.
49 + 'bzr+ssh:
50 + self.build_
51 + os.chdir('lp/a')
52 + self.assertEqual(
53 + ['Opening https:/
54 + 'browser'],
55 + self.run_open('.'))
^- did you need 'os.chdir()' rather than 'self.run_ open('lp/ a')' ?
Anyway, approve regardless, and I'll merge, but I prefer to avoid chdir when possible. (As it is changing global state, and is something we try not to do withing bzrlib. We certainly have tests that do it, but we've moved some of that out into run_bzr( working_ dir=... ))