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

Side by Side Diff: tools/telemetry/telemetry/core/browser_options_unittest.py

Issue 739623005: [Telemetry] Resolve errors due to new pylint checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready to land Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import optparse 4 import optparse
5 import os 5 import os
6 import unittest 6 import unittest
7 7
8 from telemetry.core import browser_options 8 from telemetry.core import browser_options
9 9
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 current_dir = os.path.dirname(__file__) 75 current_dir = os.path.dirname(__file__)
76 parser.parse_args(['--browser', 'any', '--profile-dir', current_dir]) 76 parser.parse_args(['--browser', 'any', '--profile-dir', current_dir])
77 self.assertEquals(options.browser_options.profile_dir, current_dir) 77 self.assertEquals(options.browser_options.profile_dir, current_dir)
78 78
79 def testExtraBrowserArgs(self): 79 def testExtraBrowserArgs(self):
80 options = browser_options.BrowserFinderOptions() 80 options = browser_options.BrowserFinderOptions()
81 parser = options.CreateParser() 81 parser = options.CreateParser()
82 parser.parse_args(['--extra-browser-args=--foo --bar']) 82 parser.parse_args(['--extra-browser-args=--foo --bar'])
83 83
84 self.assertEquals(options.browser_options.extra_browser_args, 84 self.assertEquals(options.browser_options.extra_browser_args,
85 set(['--foo','--bar'])) 85 set(['--foo', '--bar']))
86 86
87 def testUseDevToolsActivePort(self): 87 def testUseDevToolsActivePort(self):
88 options = browser_options.BrowserFinderOptions() 88 options = browser_options.BrowserFinderOptions()
89 parser = options.CreateParser() 89 parser = options.CreateParser()
90 parser.parse_args(['--use-devtools-active-port']) 90 parser.parse_args(['--use-devtools-active-port'])
91 91
92 self.assertEquals(options.browser_options.use_devtools_active_port, True) 92 self.assertEquals(options.browser_options.use_devtools_active_port, True)
93 93
94 def testMergeDefaultValues(self): 94 def testMergeDefaultValues(self):
95 options = browser_options.BrowserFinderOptions() 95 options = browser_options.BrowserFinderOptions()
(...skipping 13 matching lines...) Expand all
109 109
110 options.MergeDefaultValues(parser.get_default_values()) 110 options.MergeDefaultValues(parser.get_default_values())
111 111
112 self.assertTrue(options.already_true) 112 self.assertTrue(options.already_true)
113 self.assertFalse(options.already_false) 113 self.assertFalse(options.already_false)
114 self.assertTrue(options.unset is None) 114 self.assertTrue(options.unset is None)
115 self.assertTrue(options.default_true) 115 self.assertTrue(options.default_true)
116 self.assertFalse(options.default_false) 116 self.assertFalse(options.default_false)
117 self.assertFalse(options.override_to_true) 117 self.assertFalse(options.override_to_true)
118 self.assertTrue(options.override_to_false) 118 self.assertTrue(options.override_to_false)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/browser_options.py ('k') | tools/telemetry/telemetry/core/camel_case_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698