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

Unified Diff: tests/run_test_cases_test.py

Issue 12995009: Parse the test executable output on the fly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: oops Created 7 years, 9 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 | « run_test_cases.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/run_test_cases_test.py
diff --git a/tests/run_test_cases_test.py b/tests/run_test_cases_test.py
index 54fd450ff3c0fec80841eac507c2ac8f23375e59..2eb5935b8f58339a541b62a9c4f612b27ee53d1c 100755
--- a/tests/run_test_cases_test.py
+++ b/tests/run_test_cases_test.py
@@ -240,6 +240,38 @@ class RunTestCases(unittest.TestCase):
finally:
run_test_cases.run_test_cases = old
+ def test_convert_to_lines(self):
+ data = [
+ (
+ ('blah'),
+ ['blah'],
+ ),
+ (
+ ('blah\n'),
+ ['blah\n'],
+ ),
+ (
+ ('blah', '\n'),
+ ['blah\n'],
+ ),
+ (
+ ('\n'),
+ ['\n'],
+ ),
+ (
+ ('blah blah\nboo'),
+ ['blah blah\n', 'boo'],
+ ),
+ (
+ ('b', 'lah blah\nboo'),
+ ['blah blah\n', 'boo'],
+ ),
+ ]
+ for generator, expected in data:
+ self.assertEqual(
+ expected,
+ list(run_test_cases.convert_to_lines(generator)))
+
def testRunSome(self):
tests = [
# Try with named arguments. Accepts 3*1 failures.
« no previous file with comments | « run_test_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698