Code review comment for lp:~nmb/bzr/lp-open-containing

Revision history for this message
John A Meinel (jameinel) wrote :

+
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=...))

review: Approve

« Back to merge proposal