OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 functools | 5 import functools |
6 import threading | 6 import threading |
7 import time | 7 import time |
8 import unittest | 8 import unittest |
9 | 9 |
10 import mock | 10 import mock |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 def test_sleeps_for_minimum_zero_secs(self): | 299 def test_sleeps_for_minimum_zero_secs(self): |
300 self.t.start() | 300 self.t.start() |
301 | 301 |
302 # Flush takes 65 seconds. | 302 # Flush takes 65 seconds. |
303 interface.flush.side_effect = functools.partial(self.increment_time, 65) | 303 interface.flush.side_effect = functools.partial(self.increment_time, 65) |
304 | 304 |
305 self.assertInRange(30, 60, self.stop_event.timeout_wait()) | 305 self.assertInRange(30, 60, self.stop_event.timeout_wait()) |
306 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) | 306 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) |
307 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) | 307 self.assertAlmostEqual(0, self.stop_event.timeout_wait()) |
OLD | NEW |