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. 4 5import os 6import sys 7import unittest 8 9from telemetry import decorators 10from telemetry.util import path 11 12 13class PathTest(unittest.TestCase): 14 def testIsExecutable(self): 15 self.assertFalse(path.IsExecutable('nonexistent_file')) 16 self.assertTrue(path.IsExecutable(sys.executable)) 17 18 @decorators.Enabled('win') 19 def testFindInstalledWindowsApplication(self): 20 self.assertTrue(path.FindInstalledWindowsApplication(os.path.join( 21 'Internet Explorer', 'iexplore.exe'))) 22