Update sdk/platform-tools to version 26.0.0.
[android_tools.git] / sdk / platform-tools / systrace / catapult / telemetry / telemetry / internal / util / path_unittest.py
blobe9a0ee026328496a5888ced36bfa2356cc9e0ed1
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.
5 import os
6 import sys
7 import unittest
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')))