Rev 6007: (mbp) Fixes bug 785404 by using known executables for win32 (cmd.exe) and in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jul 1 22:52:13 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6007 [merge]
revision-id: pqm at pqm.ubuntu.com-20110701225211-q0k5frf3by2214lb
parent: pqm at pqm.ubuntu.com-20110701114559-gshz8uv6hr0x0pax
parent: gordon at doxxx.net-20110630210038-bzscps46jgcqtkr0
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2011-07-01 22:52:11 +0000
message:
  (mbp) Fixes bug 785404 by using known executables for win32 (cmd.exe) and
   other platforms (sh) in test_exe_on_path. (Gordon Tyler)
modified:
  bzrlib/tests/test_mergetools.py bzrlibteststest_merg-20100701052504-knb0llvufl26fxgx-2
=== modified file 'bzrlib/tests/test_mergetools.py'
--- a/bzrlib/tests/test_mergetools.py	2011-04-15 07:01:22 +0000
+++ b/bzrlib/tests/test_mergetools.py	2011-06-30 21:00:38 +0000
@@ -81,8 +81,11 @@
         self.assertTrue(mergetools.check_availability(sys.executable))
 
     def test_exe_on_path(self):
-        self.assertTrue(mergetools.check_availability(
-            os.path.basename(sys.executable)))
+        if sys.platform == 'win32':
+            exe = 'cmd.exe'
+        else:
+            exe = 'sh'
+        self.assertTrue(mergetools.check_availability(exe))
 
     def test_nonexistent(self):
         self.assertFalse(mergetools.check_availability('DOES NOT EXIST'))




More information about the bazaar-commits mailing list