1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
9 from telemetry
import decorators
10 from telemetry
.internal
.util
import path
13 class PathTest(unittest
.TestCase
):
14 def testIsExecutable(self
):
15 self
.assertFalse(path
.IsExecutable('nonexistent_file'))
16 self
.assertTrue(path
.IsExecutable(sys
.executable
))
18 @decorators.Enabled('win')
19 def testFindInstalledWindowsApplication(self
):
20 self
.assertTrue(path
.FindInstalledWindowsApplication(os
.path
.join(
21 'Internet Explorer', 'iexplore.exe')))
23 @decorators.Enabled('win')
24 def testFindInstalledWindowsApplicationWithWildcards(self
):
25 self
.assertTrue(path
.FindInstalledWindowsApplication(os
.path
.join(
26 '*', 'iexplore.exe')))