~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Gordon Tyler
  • Date: 2010-11-26 14:13:43 UTC
  • mto: (5321.1.101 mergetools)
  • mto: This revision was merged to the branch mainline in revision 5632.
  • Revision ID: gordon@doxxx.net-20101126141343-r9uoibtdh1g2jxc6
Changed is_executable_on_path to find_executable_on_path to make it more useful.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2118
2118
        self.assertBackupName('file.~2~', 'file')
2119
2119
 
2120
2120
 
2121
 
class TestIsExecutableInPath(tests.TestCase):
 
2121
class TestFindExecutableInPath(tests.TestCase):
2122
2122
    def test_windows(self):
2123
2123
        if sys.platform != 'win32':
2124
2124
            raise tests.TestSkipped('test requires win32')
2125
 
        self.assertTrue(osutils.is_executable_on_path('explorer'))
2126
 
        self.assertTrue(osutils.is_executable_on_path('explorer.exe'))
 
2125
        self.assertTrue(osutils.find_executable_on_path('explorer') is not None)
 
2126
        self.assertTrue(osutils.find_executable_on_path('explorer.exe') is not None)
 
2127
        self.assertTrue(
 
2128
            osutils.find_executable_on_path('THIS SHOULD NOT EXIST') is None)
2127
2129
 
2128
2130
    def test_other(self):
2129
2131
        if sys.platform == 'win32':
2130
2132
            raise tests.TestSkipped('test requires non-win32')
2131
 
        self.assertTrue(osutils.is_executable_on_path('sh'))
 
2133
        self.assertTrue(osutils.is_executable_on_path('sh') is not None)
 
2134
        self.assertTrue(
 
2135
            osutils.is_executable_on_path('THIS SHOULD NOT EXIST') is None)