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

Side by Side Diff: build/android/gyp/util/md5_check_test.py

Issue 197693002: [Android] Lint build/android/gyp/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now using extra_paths_list to avoid F0401s Created 6 years, 9 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/gyp/util/md5_check.py ('k') | build/android/gyp/write_ordered_libraries.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 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 4
5 import tempfile 5 import tempfile
6 import unittest 6 import unittest
7 7
8 import md5_check 8 import md5_check # pylint: disable=W0403
9 9
10 10
11 class TestMd5Check(unittest.TestCase): 11 class TestMd5Check(unittest.TestCase):
12 def setUp(self):
13 self.called = False
14
12 def testCallAndRecordIfStale(self): 15 def testCallAndRecordIfStale(self):
13 input_strings = ['string1', 'string2'] 16 input_strings = ['string1', 'string2']
14 input_file1 = tempfile.NamedTemporaryFile() 17 input_file1 = tempfile.NamedTemporaryFile()
15 input_file2 = tempfile.NamedTemporaryFile() 18 input_file2 = tempfile.NamedTemporaryFile()
16 file1_contents = 'input file 1' 19 file1_contents = 'input file 1'
17 file2_contents = 'input file 2' 20 file2_contents = 'input file 2'
18 input_file1.write(file1_contents) 21 input_file1.write(file1_contents)
19 input_file1.flush() 22 input_file1.flush()
20 input_file2.write(file2_contents) 23 input_file2.write(file2_contents)
21 input_file2.flush() 24 input_file2.flush()
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 63
61 input_strings = input_strings[:1] 64 input_strings = input_strings[:1]
62 CheckCallAndRecord(True, 'removing a string should trigger call') 65 CheckCallAndRecord(True, 'removing a string should trigger call')
63 66
64 input_strings.append('a brand new string') 67 input_strings.append('a brand new string')
65 CheckCallAndRecord(True, 'added input string should trigger call') 68 CheckCallAndRecord(True, 'added input string should trigger call')
66 69
67 70
68 if __name__ == '__main__': 71 if __name__ == '__main__':
69 unittest.main() 72 unittest.main()
OLDNEW
« no previous file with comments | « build/android/gyp/util/md5_check.py ('k') | build/android/gyp/write_ordered_libraries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698