diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2020-01-14 16:49:12 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-16 03:36:24 +0000 |
commit | 0410b6515691a2fd3410917849d32495490d6999 (patch) | |
tree | f456416e7706148c2505789bc51f3966c50b071c /crosperf/config_unittest.py | |
parent | c977ae00dfd11ebd7c9212b04d0cf1808ea9bfc6 (diff) | |
download | toolchain-utils-0410b6515691a2fd3410917849d32495490d6999.tar.gz |
crosperf: fix pylint for crosperf
This is the first step of python 3 migration for crosperf
TEST=Passed presubmit for all .py files in crosperf
BUG=chromium:1011676
Change-Id: I615d0323c81ba688c8ce2aa0cac307035d0b882b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2001696
Commit-Queue: Zhizhou Yang <zhizhouy@google.com>
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'crosperf/config_unittest.py')
-rwxr-xr-x | crosperf/config_unittest.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crosperf/config_unittest.py b/crosperf/config_unittest.py index 637dae9e..9e71539d 100755 --- a/crosperf/config_unittest.py +++ b/crosperf/config_unittest.py @@ -1,14 +1,17 @@ #!/usr/bin/env python2 -# -# Copyright 2014 Google Inc. All Rights Reserved. +# -*- coding: utf-8 -*- +# Copyright 2014 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + """Unit tests for config.py""" from __future__ import print_function -import config - import unittest +import config + class ConfigTestCase(unittest.TestCase): """Class for the config unit tests.""" @@ -16,7 +19,7 @@ class ConfigTestCase(unittest.TestCase): def test_config(self): # Verify that config exists, that it's a dictionary, and that it's # empty. - self.assertTrue(type(config.config) is dict) + self.assertTrue(isinstance(config.config, dict)) self.assertEqual(len(config.config), 0) # Verify that attempting to get a non-existant key out of the @@ -42,7 +45,7 @@ class ConfigTestCase(unittest.TestCase): # Verify that config exists, that it's a dictionary, and that it's # empty. - self.assertTrue(type(config.config) is dict) + self.assertTrue(isinstance(config.config, dict)) self.assertEqual(len(config.config), 0) |