Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / chromite / cros / commands / cros_lint_unittest.py
1 #!/usr/bin/python
2 # Copyright 2014 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """This module tests the cros lint command."""
7
8 from __future__ import print_function
9
10 import os
11 import sys
12
13 sys.path.insert(0, os.path.abspath('%s/../../..' % os.path.dirname(__file__)))
14 from chromite.cros.commands import cros_lint
15 from chromite.lib import cros_test_lib
16
17
18 class LintCommandTest(cros_test_lib.TestCase):
19   """Test class for our LintCommand class."""
20
21   def testOutputArgument(self):
22     """Tests that the --output argument mapping for cpplint is complete."""
23     self.assertEqual(
24         set(cros_lint.LintCommand.OUTPUT_FORMATS),
25         set(cros_lint.CPPLINT_OUTPUT_FORMAT_MAP.keys() + ['default']))
26
27
28 if __name__ == '__main__':
29   cros_test_lib.main()