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

Side by Side Diff: swarm_client/googletest/tests/list_test_cases_smoke_test.py

Issue 69143004: Delete swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 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 logging
7 import os
8 import subprocess
9 import sys
10 import unittest
11
12 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
13
14
15 class ListTestCases(unittest.TestCase):
16 def capture(self, cmd):
17 p = subprocess.Popen(
18 [sys.executable] + cmd,
19 stdout=subprocess.PIPE,
20 stderr=subprocess.PIPE,
21 cwd=ROOT_DIR,
22 universal_newlines=True)
23 out, err = p.communicate()
24 self.assertEqual('', err)
25 self.assertEqual(0, p.returncode)
26 return out
27
28 def test_default(self):
29 out = self.capture(
30 [
31 'list_test_cases.py',
32 os.path.join('tests', 'gtest_fake', 'gtest_fake_pass.py'),
33 ])
34 self.assertEqual('Foo.Bar/3\nFoo.Bar1\nFoo.Bar2\n', out)
35
36
37 if __name__ == '__main__':
38 logging.basicConfig(
39 level=(logging.DEBUG if '-v' in sys.argv else logging.FATAL))
40 unittest.main()
OLDNEW
« no previous file with comments | « swarm_client/googletest/tests/isolate_test_cases_smoke_test.py ('k') | swarm_client/googletest/tests/run_test_cases/output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698