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

Unified Diff: mojo/tools/mopy/gtest_list_tests_unittest.py

Issue 878933003: Move the apptest runner and parts of mopy to the public SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/mopy/gtest.py ('k') | mojo/tools/mopy/memoize.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/mopy/gtest_list_tests_unittest.py
diff --git a/mojo/tools/mopy/gtest_list_tests_unittest.py b/mojo/tools/mopy/gtest_list_tests_unittest.py
deleted file mode 100644
index 8cac5efca50d3bd253b4e50291780d534fd371ad..0000000000000000000000000000000000000000
--- a/mojo/tools/mopy/gtest_list_tests_unittest.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from mopy.gtest import _gtest_list_tests
-
-class GTestListTestsTest(unittest.TestCase):
- """Tests |_gtest_list_tests()| handling of --gtest_list_tests output."""
-
- def testSingleSuiteAndFixture(self):
- """Tests a single suite with a single fixture."""
- gtest_output = "TestSuite.\n TestFixture\n"
- expected_test_list = ["TestSuite.TestFixture"]
- self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list)
-
- def testWindowsNewlines(self):
- """Tests handling of \r\n newlines."""
- gtest_output = "TestSuite.\r\n TestFixture1\r\n"
- expected_test_list = ["TestSuite.TestFixture1"]
- self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list)
-
- def testSingleSuiteAndMultipleFixtures(self):
- """Tests a single suite with multiple fixtures."""
- gtest_output = "TestSuite.\n TestFixture1\n TestFixture2\n"
- expected_test_list = ["TestSuite.TestFixture1", "TestSuite.TestFixture2"]
- self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list)
-
- def testMultipleSuitesAndFixtures(self):
- """Tests multiple suites each with multiple fixtures."""
- gtest_output = ("TestSuite1.\n TestFixture1\n TestFixture2\n"
- "TestSuite2.\n TestFixtureA\n TestFixtureB\n")
- expected_test_list = ["TestSuite1.TestFixture1", "TestSuite1.TestFixture2",
- "TestSuite2.TestFixtureA", "TestSuite2.TestFixtureB"]
- self.assertEquals(_gtest_list_tests(gtest_output), expected_test_list)
-
- def testUnrecognizedFormats(self):
- """Tests examples of unrecognized --gtest_list_tests output."""
- self.assertRaises(Exception, _gtest_list_tests, "Foo")
- self.assertRaises(Exception, _gtest_list_tests, "Foo\n")
- self.assertRaises(Exception, _gtest_list_tests, "Foo.Bar\n")
- self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar\n")
- self.assertRaises(Exception, _gtest_list_tests, "Foo.\r\nBar\r\nGaz\r\n")
- self.assertRaises(Exception, _gtest_list_tests, "Foo.\nBar.\n Gaz\n")
-
-
-if __name__ == "__main__":
- unittest.main()
« no previous file with comments | « mojo/tools/mopy/gtest.py ('k') | mojo/tools/mopy/memoize.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698