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

Side by Side Diff: tools_webrtc/autoroller/unittests/roll_deps_test.py

Issue 3011413002: Remove remaining mentions of gflags (Closed)
Patch Set: Replace `!build_with_chromium` with `rtc_include_tests` Created 3 years, 2 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 | « tools_webrtc/autoroller/roll_deps.py ('k') | tools_webrtc/autoroller/unittests/testdata/DEPS » ('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) 2015 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 import glob 10 import glob
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 def testParseDepsDict(self): 100 def testParseDepsDict(self):
101 with open(self._webrtc_depsfile) as deps_file: 101 with open(self._webrtc_depsfile) as deps_file:
102 deps_contents = deps_file.read() 102 deps_contents = deps_file.read()
103 local_scope = ParseDepsDict(deps_contents) 103 local_scope = ParseDepsDict(deps_contents)
104 vars_dict = local_scope['vars'] 104 vars_dict = local_scope['vars']
105 105
106 def AssertVar(variable_name): 106 def AssertVar(variable_name):
107 self.assertEquals(vars_dict[variable_name], TEST_DATA_VARS[variable_name]) 107 self.assertEquals(vars_dict[variable_name], TEST_DATA_VARS[variable_name])
108 AssertVar('chromium_git') 108 AssertVar('chromium_git')
109 AssertVar('chromium_revision') 109 AssertVar('chromium_revision')
110 self.assertEquals(len(local_scope['deps']), 3) 110 self.assertEquals(len(local_scope['deps']), 2)
111 self.assertEquals(len(local_scope['deps_os']), 1) 111 self.assertEquals(len(local_scope['deps_os']), 1)
112 112
113 def testGetMatchingDepsEntriesReturnsPathInSimpleCase(self): 113 def testGetMatchingDepsEntriesReturnsPathInSimpleCase(self):
114 entries = GetMatchingDepsEntries(DEPS_ENTRIES, 'src/testing/gtest') 114 entries = GetMatchingDepsEntries(DEPS_ENTRIES, 'src/testing/gtest')
115 self.assertEquals(len(entries), 1) 115 self.assertEquals(len(entries), 1)
116 self.assertEquals(entries[0], DEPS_ENTRIES['src/testing/gtest']) 116 self.assertEquals(entries[0], DEPS_ENTRIES['src/testing/gtest'])
117 117
118 def testGetMatchingDepsEntriesHandlesSimilarStartingPaths(self): 118 def testGetMatchingDepsEntriesHandlesSimilarStartingPaths(self):
119 entries = GetMatchingDepsEntries(DEPS_ENTRIES, 'src/testing') 119 entries = GetMatchingDepsEntries(DEPS_ENTRIES, 'src/testing')
120 self.assertEquals(len(entries), 2) 120 self.assertEquals(len(entries), 2)
(...skipping 19 matching lines...) Expand all
140 self.assertEquals(changed_deps[1].new_rev, BUILDTOOLS_NEW_REV) 140 self.assertEquals(changed_deps[1].new_rev, BUILDTOOLS_NEW_REV)
141 141
142 142
143 def _SetupGitLsRemoteCall(cmd_fake, url, revision): 143 def _SetupGitLsRemoteCall(cmd_fake, url, revision):
144 cmd = ['git', 'ls-remote', url, revision] 144 cmd = ['git', 'ls-remote', url, revision]
145 cmd_fake.AddExpectation(cmd, _returns=(revision, None)) 145 cmd_fake.AddExpectation(cmd, _returns=(revision, None))
146 146
147 147
148 if __name__ == '__main__': 148 if __name__ == '__main__':
149 unittest.main() 149 unittest.main()
OLDNEW
« no previous file with comments | « tools_webrtc/autoroller/roll_deps.py ('k') | tools_webrtc/autoroller/unittests/testdata/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698