| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import datetime | 5 import datetime |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'step', | 8 'step', |
| 9 'time', | 9 'time', |
| 10 ] | 10 ] |
| 11 | 11 |
| 12 | 12 |
| 13 def RunSteps(api): | 13 def RunSteps(api): |
| 14 now = api.time.time() | 14 now = api.time.time() |
| 15 api.step('echo', ['echo', str(now)]) | 15 api.step('echo', ['echo', str(now)]) |
| 16 assert isinstance(api.time.utcnow(), datetime.datetime) | 16 assert isinstance(api.time.utcnow(), datetime.datetime) |
| 17 | 17 |
| 18 | 18 |
| 19 def GenTests(api): | 19 def GenTests(api): |
| 20 yield api.test('defaults') | 20 yield api.test('defaults') |
| 21 yield api.test('seed_and_step') + api.time.seed(123) + api.time.step(2) | 21 yield api.test('seed_and_step') + api.time.seed(123) + api.time.step(2) |
| OLD | NEW |