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

Side by Side Diff: commit-queue/tests/count_test.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 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 | « commit-queue/tests/commit_queue_test.py ('k') | commit-queue/tests/data/testCMDbuilds.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium 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 """Unit tests for tools/count.py."""
7
8 import os
9 import sys
10 import unittest
11
12 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
13 PROJECT_DIR = os.path.join(ROOT_DIR, '..')
14 sys.path.insert(0, PROJECT_DIR)
15
16
17 import find_depot_tools # pylint: disable=W0611
18 import subprocess2
19
20
21 class TestCount(unittest.TestCase):
22 def test_2011_04_09(self):
23 # Verifies commits done on that day.
24 # TODO(maruel): Import directly and do not use live data.
25 expected = (
26 "Getting data from 2011-04-09 for 1 days\n"
27 "Top users: 3 out of 3 total users 100.00%\n"
28 " Committed 3 out of 3 CQ'ed commits 100.00%\n"
29 "\n"
30 "Total commits: 26\n"
31 "Total commits by commit bot: 3 ( 11.5%)\n")
32 exe_path = os.path.join(PROJECT_DIR, 'tools', 'count.py')
33 args = [sys.executable, exe_path, '-s', '2011-04-09', '-d', '1', '-o']
34 self.assertEqual(expected, subprocess2.check_output(args))
35
36
37 if __name__ == '__main__':
38 unittest.main()
OLDNEW
« no previous file with comments | « commit-queue/tests/commit_queue_test.py ('k') | commit-queue/tests/data/testCMDbuilds.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698