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

Side by Side Diff: packages/infra_libs/infra_libs/event_mon/test/checkouts_test.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 unittest 5 import unittest
6 from infra_libs.event_mon import checkouts 6 from infra_libs.event_mon import checkouts
7 7
8 8
9 class TestParseRevInfo(unittest.TestCase): 9 class TestParseRevInfo(unittest.TestCase):
10 def test_empty_file(self): 10 def test_empty_file(self):
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 testing_support: https://chromium.googlesource.com/infra/testing/testing_support .git@134e350cb5c6bfc14e8b8d0f0f0508ffc769d3bb 50 testing_support: https://chromium.googlesource.com/infra/testing/testing_support .git@134e350cb5c6bfc14e8b8d0f0f0508ffc769d3bb
51 """ 51 """
52 revinfo = checkouts.parse_revinfo(output) 52 revinfo = checkouts.parse_revinfo(output)
53 # Check some invariants 53 # Check some invariants
54 self.assertTrue(len(revinfo) > 0, 'revinfo should contain values') 54 self.assertTrue(len(revinfo) > 0, 'revinfo should contain values')
55 for v in revinfo.itervalues(): 55 for v in revinfo.itervalues():
56 self.assertEqual(len(v), 2) 56 self.assertEqual(len(v), 2)
57 self.assertIn('://', v['source_url'], 57 self.assertIn('://', v['source_url'],
58 msg='"://" not in url string. Got %s' % v['source_url']) 58 msg='"://" not in url string. Got %s' % v['source_url'])
59 self.assertIn(v['source_url'].split('://')[0], ('https', 'svn')) 59 self.assertIn(v['source_url'].split('://')[0], ('https', 'svn'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698