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

Unified Diff: tools/telemetry/telemetry/testing/progress_reporter_unittest.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: tools/telemetry/telemetry/testing/progress_reporter_unittest.py
diff --git a/tools/telemetry/telemetry/testing/progress_reporter_unittest.py b/tools/telemetry/telemetry/testing/progress_reporter_unittest.py
deleted file mode 100644
index 2a6088235fa79953500fe11731b0477610e3092a..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/testing/progress_reporter_unittest.py
+++ /dev/null
@@ -1,54 +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 telemetry.testing import progress_reporter
-
-
-class TestFoo(unittest.TestCase):
- # Test method doesn't have test- prefix intentionally. This is so that
- # run_test script won't run this test.
- def RunPassingTest(self):
- pass
-
- def RunFailingTest(self):
- self.fail('expected failure')
-
-
-class LoggingProgressReporter(object):
- def __init__(self):
- self._call_log = []
-
- @property
- def call_log(self):
- return tuple(self._call_log)
-
- def __getattr__(self, name):
- def wrapper(*_):
- self._call_log.append(name)
- return wrapper
-
-
-class ProgressReporterTest(unittest.TestCase):
- def testTestRunner(self):
- suite = progress_reporter.TestSuite()
- suite.addTest(TestFoo(methodName='RunPassingTest'))
- suite.addTest(TestFoo(methodName='RunFailingTest'))
-
- reporter = LoggingProgressReporter()
- runner = progress_reporter.TestRunner()
- progress_reporters = (reporter,)
- result = runner.run(suite, progress_reporters, 1, None)
-
- self.assertEqual(len(result.successes), 1)
- self.assertEqual(len(result.failures), 1)
- self.assertEqual(len(result.failures_and_errors), 1)
- expected = (
- 'StartTestRun', 'StartTestSuite',
- 'StartTest', 'Success', 'StopTest',
- 'StartTest', 'Failure', 'StopTest',
- 'StopTestSuite', 'StopTestRun',
- )
- self.assertEqual(reporter.call_log, expected)
« no previous file with comments | « tools/telemetry/telemetry/testing/progress_reporter.py ('k') | tools/telemetry/telemetry/testing/run_chromeos_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698