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

Side by Side Diff: build/android/emma_coverage_stats_test.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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
« no previous file with comments | « build/android/emma_coverage_stats.py ('k') | build/android/findbugs_diff.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # pylint: disable=protected-access
7
6 import os 8 import os
7 import sys 9 import sys
8 import unittest 10 import unittest
9 from xml.etree import ElementTree 11 from xml.etree import ElementTree
10 12
11 import emma_coverage_stats 13 import emma_coverage_stats
12 from pylib import constants 14 from pylib import constants
13 15
14 sys.path.append(os.path.join( 16 sys.path.append(os.path.join(
15 constants.DIR_SOURCE_ROOT, 'third_party', 'pymock')) 17 constants.DIR_SOURCE_ROOT, 'third_party', 'pymock'))
16 import mock # pylint: disable=F0401 18 import mock # pylint: disable=import-error
17 19
18 EMPTY_COVERAGE_STATS_DICT = { 20 EMPTY_COVERAGE_STATS_DICT = {
19 'files': {}, 21 'files': {},
20 'patch': { 22 'patch': {
21 'incremental': { 23 'incremental': {
22 'covered': 0, 'total': 0 24 'covered': 0, 'total': 0
23 } 25 }
24 } 26 }
25 } 27 }
26 28
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 mock_open = mock.mock_open() 557 mock_open = mock.mock_open()
556 mock_open.side_effect = [mock.mock_open(read_data=side_effect).return_value 558 mock_open.side_effect = [mock.mock_open(read_data=side_effect).return_value
557 for side_effect in side_effects] 559 for side_effect in side_effects]
558 with mock.patch('__builtin__.open', mock_open): 560 with mock.patch('__builtin__.open', mock_open):
559 return func(**kwargs), mock_open 561 return func(**kwargs), mock_open
560 562
561 563
562 if __name__ == '__main__': 564 if __name__ == '__main__':
563 # Suppress logging messages. 565 # Suppress logging messages.
564 unittest.main(buffer=True) 566 unittest.main(buffer=True)
OLDNEW
« no previous file with comments | « build/android/emma_coverage_stats.py ('k') | build/android/findbugs_diff.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698