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

Side by Side Diff: mojo/devtools/common/devtoolslib/apptest_gtest_unittest.py

Issue 1128153002: Rename the devtools library: pylib -> devtoolslib. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address offline comments/ devtools_lib -> devtoolslib. Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 imp 5 import imp
6 import os.path 6 import os.path
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 try: 10 try:
11 imp.find_module("pylib") 11 imp.find_module("pylib")
12 except ImportError: 12 except ImportError:
13 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 13 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
14 from pylib.apptest_gtest import _gtest_list_tests 14 from devtoolslib.apptest_gtest import _gtest_list_tests
15 15
16 16
17 class GTestListTestsTest(unittest.TestCase): 17 class GTestListTestsTest(unittest.TestCase):
18 """Tests |_gtest_list_tests()| handling of --gtest_list_tests output.""" 18 """Tests |_gtest_list_tests()| handling of --gtest_list_tests output."""
19 19
20 def testSingleSuiteAndFixture(self): 20 def testSingleSuiteAndFixture(self):
21 """Tests a single suite with a single fixture.""" 21 """Tests a single suite with a single fixture."""
22 gtest_output = "TestSuite.\n TestFixture\n" 22 gtest_output = "TestSuite.\n TestFixture\n"
23 expected_test_list = ["TestSuite.TestFixture"] 23 expected_test_list = ["TestSuite.TestFixture"]
24 self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list) 24 self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list)
(...skipping 23 matching lines...) Expand all
48 self.assertRaises(Exception, _gtest_list_tests, "Foo") 48 self.assertRaises(Exception, _gtest_list_tests, "Foo")
49 self.assertRaises(Exception, _gtest_list_tests, "Foo\n") 49 self.assertRaises(Exception, _gtest_list_tests, "Foo\n")
50 self.assertRaises(Exception, _gtest_list_tests, "Foo.Bar\n") 50 self.assertRaises(Exception, _gtest_list_tests, "Foo.Bar\n")
51 self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar\n") 51 self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar\n")
52 self.assertRaises(Exception, _gtest_list_tests, "Foo.\r\nBar\r\nGaz\r\n") 52 self.assertRaises(Exception, _gtest_list_tests, "Foo.\r\nBar\r\nGaz\r\n")
53 self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar.\n Gaz\n") 53 self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar.\n Gaz\n")
54 54
55 55
56 if __name__ == "__main__": 56 if __name__ == "__main__":
57 unittest.main() 57 unittest.main()
OLDNEW
« no previous file with comments | « mojo/devtools/common/devtoolslib/apptest_gtest.py ('k') | mojo/devtools/common/devtoolslib/http_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698