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

Side by Side Diff: tests/presubmit_unittest.py

Issue 14729012: Fix many (but not all[1]) depot_tools tests on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix SvnCheckout.testMove flakiness Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « tests/gclient_scm_test.py ('k') | tests/subprocess2_test.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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Unit tests for presubmit_support.py and presubmit_canned_checks.py.""" 6 """Unit tests for presubmit_support.py and presubmit_canned_checks.py."""
7 7
8 # pylint: disable=E1101,E1103 8 # pylint: disable=E1101,E1103
9 9
10 import logging 10 import logging
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 'BUG=123', 945 'BUG=123',
946 ' STORY =http://foo/ \t', 946 ' STORY =http://foo/ \t',
947 'and some more regular text') 947 'and some more regular text')
948 files = [ 948 files = [
949 ['A', join('foo', 'blat.cc')], 949 ['A', join('foo', 'blat.cc')],
950 ['M', join('foo', 'blat', 'READ_ME2')], 950 ['M', join('foo', 'blat', 'READ_ME2')],
951 ['M', join('foo', 'blat', 'binary.dll')], 951 ['M', join('foo', 'blat', 'binary.dll')],
952 ['M', join('foo', 'blat', 'weird.xyz')], 952 ['M', join('foo', 'blat', 'weird.xyz')],
953 ['M', join('foo', 'blat', 'another.h')], 953 ['M', join('foo', 'blat', 'another.h')],
954 ['M', join('foo', 'third_party', 'third.cc')], 954 ['M', join('foo', 'third_party', 'third.cc')],
955 ['D', 'foo/mat/beingdeleted.txt'], 955 ['D', join('foo', 'mat', 'beingdeleted.txt')],
956 ['M', 'flop/notfound.txt'], 956 ['M', join('flop', 'notfound.txt')],
957 ['A', 'boo/flap.h'], 957 ['A', join('boo', 'flap.h')],
958 ] 958 ]
959 blat = presubmit.normpath(join(self.fake_root_dir, files[0][1])) 959 blat = presubmit.normpath(join(self.fake_root_dir, files[0][1]))
960 readme = presubmit.normpath(join(self.fake_root_dir, files[1][1])) 960 readme = presubmit.normpath(join(self.fake_root_dir, files[1][1]))
961 binary = presubmit.normpath(join(self.fake_root_dir, files[2][1])) 961 binary = presubmit.normpath(join(self.fake_root_dir, files[2][1]))
962 weird = presubmit.normpath(join(self.fake_root_dir, files[3][1])) 962 weird = presubmit.normpath(join(self.fake_root_dir, files[3][1]))
963 another = presubmit.normpath(join(self.fake_root_dir, files[4][1])) 963 another = presubmit.normpath(join(self.fake_root_dir, files[4][1]))
964 third_party = presubmit.normpath(join(self.fake_root_dir, files[5][1])) 964 third_party = presubmit.normpath(join(self.fake_root_dir, files[5][1]))
965 beingdeleted = presubmit.normpath(join(self.fake_root_dir, files[6][1])) 965 beingdeleted = presubmit.normpath(join(self.fake_root_dir, files[6][1]))
966 notfound = presubmit.normpath(join(self.fake_root_dir, files[7][1])) 966 notfound = presubmit.normpath(join(self.fake_root_dir, files[7][1]))
967 flap = presubmit.normpath(join(self.fake_root_dir, files[8][1])) 967 flap = presubmit.normpath(join(self.fake_root_dir, files[8][1]))
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 owners_check=False) 2531 owners_check=False)
2532 self.assertEqual(1, len(results)) 2532 self.assertEqual(1, len(results))
2533 self.assertEqual( 2533 self.assertEqual(
2534 'Found line ending with white spaces in:', results[0]._message) 2534 'Found line ending with white spaces in:', results[0]._message)
2535 self.checkstdout('') 2535 self.checkstdout('')
2536 2536
2537 2537
2538 if __name__ == '__main__': 2538 if __name__ == '__main__':
2539 import unittest 2539 import unittest
2540 unittest.main() 2540 unittest.main()
OLDNEW
« no previous file with comments | « tests/gclient_scm_test.py ('k') | tests/subprocess2_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698