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

Unified Diff: third_party/typ/typ/tests/arg_parser_test.py

Issue 660133004: Roll typ to v0.8.5 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « third_party/typ/typ/runner.py ('k') | third_party/typ/typ/tests/cmdline_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/typ/typ/tests/arg_parser_test.py
diff --git a/third_party/typ/typ/tests/arg_parser_test.py b/third_party/typ/typ/tests/arg_parser_test.py
index caaf373c60fb066564dc43c4e3c8756348a0459d..aabaebec47e08c657f9f6119f3aa2409a6767371 100644
--- a/third_party/typ/typ/tests/arg_parser_test.py
+++ b/third_party/typ/typ/tests/arg_parser_test.py
@@ -29,3 +29,17 @@ class ArgumentParserTest(unittest.TestCase):
skip='[-d]')
options, _ = parser.parse_args(['-j', '1'])
self.assertEqual(options.jobs, 1)
+
+ def test_argv_from_args(self):
+
+ def check(argv, expected=None):
+ parser = ArgumentParser()
+ args = parser.parse_args(argv)
+ actual_argv = parser.argv_from_args(args)
+ expected = expected or argv
+ self.assertEqual(expected, actual_argv)
+
+ check(['--version'])
+ check(['--coverage', '--coverage-omit', 'foo'])
+ check(['--jobs', '4'])
+ check(['-vv'], ['--verbose', '--verbose'])
« no previous file with comments | « third_party/typ/typ/runner.py ('k') | third_party/typ/typ/tests/cmdline_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698