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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/style/optparser_unittest.py

Issue 2679393004: Fix all "dangerous-default-value" pylint warnings. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 1 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 22 matching lines...) Expand all
33 33
34 class ArgumentPrinterTest(unittest.TestCase): 34 class ArgumentPrinterTest(unittest.TestCase):
35 35
36 """Tests the ArgumentPrinter class.""" 36 """Tests the ArgumentPrinter class."""
37 37
38 _printer = ArgumentPrinter() 38 _printer = ArgumentPrinter()
39 39
40 def _create_options(self, 40 def _create_options(self,
41 output_format='emacs', 41 output_format='emacs',
42 min_confidence=3, 42 min_confidence=3,
43 filter_rules=[], 43 filter_rules=None,
44 git_commit=None): 44 git_commit=None):
45 return ProcessorOptions(filter_rules=filter_rules, 45 return ProcessorOptions(filter_rules=filter_rules,
46 git_commit=git_commit, 46 git_commit=git_commit,
47 min_confidence=min_confidence, 47 min_confidence=min_confidence,
48 output_format=output_format) 48 output_format=output_format)
49 49
50 def test_to_flag_string(self): 50 def test_to_flag_string(self):
51 options = self._create_options('vs7', 5, ['+foo', '-bar'], 'git') 51 options = self._create_options('vs7', 5, ['+foo', '-bar'], 'git')
52 self.assertEqual('--filter=+foo,-bar --git-commit=git ' 52 self.assertEqual('--filter=+foo,-bar --git-commit=git '
53 '--min-confidence=5 --output=vs7', 53 '--min-confidence=5 --output=vs7',
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 self.assertFalse(options.__eq__(ProcessorOptions(is_verbose=True))) 247 self.assertFalse(options.__eq__(ProcessorOptions(is_verbose=True)))
248 self.assertFalse(options.__eq__(ProcessorOptions(min_confidence=2))) 248 self.assertFalse(options.__eq__(ProcessorOptions(min_confidence=2)))
249 self.assertFalse(options.__eq__(ProcessorOptions(output_format="vs7"))) 249 self.assertFalse(options.__eq__(ProcessorOptions(output_format="vs7")))
250 250
251 def test_ne(self): 251 def test_ne(self):
252 """Test __ne__ inequality function.""" 252 """Test __ne__ inequality function."""
253 # By default, __ne__ always returns true on different objects. 253 # By default, __ne__ always returns true on different objects.
254 # Thus, just check the distinguishing case to verify that the 254 # Thus, just check the distinguishing case to verify that the
255 # code defines __ne__. 255 # code defines __ne__.
256 self.assertFalse(ProcessorOptions().__ne__(ProcessorOptions())) 256 self.assertFalse(ProcessorOptions().__ne__(ProcessorOptions()))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698