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

Side by Side Diff: svn_to_git_public_unittest.py

Issue 627493002: deps2git: Improve support for WebRTC and its deps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/deps2git/
Patch Set: Added unittest Created 6 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 | Annotate | Revision Log
« no previous file with comments | « svn_to_git_public.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2014 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 import unittest
7
8 import svn_to_git_public
9
10
11 class SvnUrlToGitUrlTest(unittest.TestCase):
12 def testWebRtcUrls(self):
13 expected = {
14 'deps/third_party/junit': '/deps/third_party/junit',
agable 2014/10/10 08:57:51 Not a huge fan of adding *real* urls to this test.
kjellander_chromium 2014/10/10 09:03:53 I mostly wanted them for my own sake to doublechec
15 'deps/third_party/openmax': '/deps/third_party/openmax',
16 'deps/third_party/winsdk_samples_v71':
17 '/deps/third_party/winsdk_samples_v71',
18 'deps/third_party/android': '/deps/third_party/android',
19 'trunk': '',
20 'trunk/talk': '/trunk/talk',
21 'trunk/webrtc': '/trunk/webrtc',
22 }
23 svn_base_url = 'https://webrtc.googlecode.com/svn'
24 git_base_url = svn_to_git_public.GIT_HOST + 'external/webrtc'
agable 2014/10/10 08:57:51 Also, this kind of logic in a test is unfortunate.
kjellander_chromium 2014/10/10 09:03:53 Done.
25
26 path = 'just/some/path'
27 for k, v in expected.iteritems():
28 res = svn_to_git_public.SvnUrlToGitUrl(path, '%s/%s' % (svn_base_url, k))
29 self.assertEqual(res[0], path)
30 self.assertEqual(res[1], '%s%s.git' % (git_base_url, v))
31
32
33 if __name__ == '__main__':
34 unittest.main()
OLDNEW
« no previous file with comments | « svn_to_git_public.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698