Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: tools/telemetry/telemetry/util/path_unittest.py

Issue 412553006: [telemetry] Add util.path module and util.path.FindInstalledWindowsApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/util/path.py ('k') | tools/telemetry/telemetry/util/support_binaries.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/util/path_unittest.py
diff --git a/tools/telemetry/telemetry/util/path_unittest.py b/tools/telemetry/telemetry/util/path_unittest.py
new file mode 100644
index 0000000000000000000000000000000000000000..2352c75f12caf20053244da69f4393ede3020788
--- /dev/null
+++ b/tools/telemetry/telemetry/util/path_unittest.py
@@ -0,0 +1,21 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+import unittest
+
+from telemetry import decorators
+from telemetry.util import path
+
+
+class PathTest(unittest.TestCase):
+ def testIsExecutable(self):
+ self.assertFalse(path.IsExecutable('nonexistent_file'))
+ self.assertTrue(path.IsExecutable(sys.executable))
+
+ @decorators.Enabled('win')
+ def testFindInstalledWindowsApplication(self):
+ self.assertTrue(path.FindInstalledWindowsApplication(os.path.join(
+ 'Internet Explorer', 'iexplore.exe')))
« no previous file with comments | « tools/telemetry/telemetry/util/path.py ('k') | tools/telemetry/telemetry/util/support_binaries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698