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

Unified Diff: telemetry/telemetry/core/util_unittest.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 years, 2 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 | « telemetry/telemetry/core/util.py ('k') | telemetry/telemetry/internal/actions/action_runner_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/core/util_unittest.py
diff --git a/telemetry/telemetry/core/util_unittest.py b/telemetry/telemetry/core/util_unittest.py
index 0d8ace3dc13fbb6201634c86d38557803f177a98..75110ad0b863240aba96ec901c3ab986d796f86a 100644
--- a/telemetry/telemetry/core/util_unittest.py
+++ b/telemetry/telemetry/core/util_unittest.py
@@ -6,46 +6,9 @@ import shutil
import tempfile
import unittest
-from telemetry.core import exceptions
from telemetry.core import util
-class TestWait(unittest.TestCase):
-
- def testNonTimeout(self):
-
- def test():
- return True
-
- util.WaitFor(test, 0.1)
-
- def testTimeout(self):
-
- def test():
- return False
-
- self.assertRaises(exceptions.TimeoutException,
- lambda: util.WaitFor(test, 0.1))
-
- def testCallable(self):
- """Test methods and anonymous functions, functions are tested elsewhere."""
-
- class Test(object):
-
- def Method(self):
- return 'test'
-
- util.WaitFor(Test().Method, 0.1)
-
- util.WaitFor(lambda: 1, 0.1)
-
- # Test noncallable condition.
- self.assertRaises(TypeError, lambda: util.WaitFor('test', 0.1))
-
- def testReturn(self):
- self.assertEquals('test', util.WaitFor(lambda: 'test', 0.1))
-
-
class TestGetSequentialFileName(unittest.TestCase):
def __init__(self, *args, **kwargs):
« no previous file with comments | « telemetry/telemetry/core/util.py ('k') | telemetry/telemetry/internal/actions/action_runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698