~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

Merge pt1 hooks branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2119
2119
        # revisited if we test against all implementations.
2120
2120
        self.backups.remove('file.~2~')
2121
2121
        self.assertBackupName('file.~2~', 'file')
 
2122
 
 
2123
 
 
2124
class TestFindExecutableInPath(tests.TestCase):
 
2125
 
 
2126
    def test_windows(self):
 
2127
        if sys.platform != 'win32':
 
2128
            raise tests.TestSkipped('test requires win32')
 
2129
        self.assertTrue(osutils.find_executable_on_path('explorer') is not None)
 
2130
        self.assertTrue(
 
2131
            osutils.find_executable_on_path('explorer.exe') is not None)
 
2132
        self.assertTrue(
 
2133
            osutils.find_executable_on_path('EXPLORER.EXE') is not None)
 
2134
        self.assertTrue(
 
2135
            osutils.find_executable_on_path('THIS SHOULD NOT EXIST') is None)
 
2136
        self.assertTrue(osutils.find_executable_on_path('file.txt') is None)
 
2137
 
 
2138
    def test_other(self):
 
2139
        if sys.platform == 'win32':
 
2140
            raise tests.TestSkipped('test requires non-win32')
 
2141
        self.assertTrue(osutils.find_executable_on_path('sh') is not None)
 
2142
        self.assertTrue(
 
2143
            osutils.find_executable_on_path('THIS SHOULD NOT EXIST') is None)