Rev 4876: (vila, nudger=jam) Avoid os.chdir() call in test in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Dec 8 10:50:13 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4876 [merge]
revision-id: pqm at pqm.ubuntu.com-20091208105012-o6t55ahh4i6ofqlj
parent: pqm at pqm.ubuntu.com-20091208025009-gl99rafhvgv3ukhs
parent: v.ladeuil+lp at free.fr-20091208100553-0lt8i1ff9gmngv92
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-12-08 10:50:12 +0000
message:
(vila, nudger=jam) Avoid os.chdir() call in test
modified:
bzrlib/plugins/launchpad/test_lp_open.py test_lp_open.py-20090125174355-hxrsxh3sj84225qu-1
=== modified file 'bzrlib/plugins/launchpad/test_lp_open.py'
--- a/bzrlib/plugins/launchpad/test_lp_open.py 2009-12-07 15:47:05 +0000
+++ b/bzrlib/plugins/launchpad/test_lp_open.py 2009-12-08 10:04:18 +0000
@@ -17,14 +17,14 @@
"""Tests for the launchpad-open command."""
from bzrlib.tests import TestCaseWithTransport
-import os
class TestLaunchpadOpen(TestCaseWithTransport):
- def run_open(self, location, retcode=0):
- out, err = self.run_bzr(
- ['launchpad-open', '--dry-run', location], retcode=retcode)
+ def run_open(self, location, retcode=0, working_dir='.'):
+ out, err = self.run_bzr(['launchpad-open', '--dry-run', location],
+ retcode=retcode,
+ working_dir=working_dir)
return err.splitlines()
def test_non_branch(self):
@@ -95,8 +95,7 @@
wt.branch.set_push_location(
'bzr+ssh://bazaar.launchpad.net/~foo/bar/baz')
self.build_tree(['lp/a/'])
- os.chdir('lp/a')
self.assertEqual(
['Opening https://code.edge.launchpad.net/~foo/bar/baz in web '
'browser'],
- self.run_open('.'))
+ self.run_open('.', working_dir='lp/a'))
More information about the bazaar-commits
mailing list