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

Unified Diff: infra/tools/new_tool/test/__main___test.py

Issue 1172053003: Created infra/tools/new_tool (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: More tests Created 5 years, 6 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 | « infra/tools/new_tool/test/__init__.py ('k') | infra/tools/new_tool/test/data/test_template.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/tools/new_tool/test/__main___test.py
diff --git a/infra/tools/new_tool/test/__main___test.py b/infra/tools/new_tool/test/__main___test.py
new file mode 100644
index 0000000000000000000000000000000000000000..8169a531d4e614aa4eb3466e67ef19b980eb3aa7
--- /dev/null
+++ b/infra/tools/new_tool/test/__main___test.py
@@ -0,0 +1,16 @@
+# Copyright 2015 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 unittest
+
+import infra.tools.new_tool.__main__ as new_tool_main
+import infra_libs
+
+
+class TestMain(unittest.TestCase):
+ def test_run_main(self):
+ with infra_libs.temporary_directory(prefix='new-tool-test-') as tempdir:
+ new_tool_main.main(['whatever_tool', '--base-dir', tempdir])
+ self.assertTrue(os.path.isdir(os.path.join(tempdir, 'whatever_tool')))
« no previous file with comments | « infra/tools/new_tool/test/__init__.py ('k') | infra/tools/new_tool/test/data/test_template.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698