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

Side by Side Diff: recipe_modules/time/examples/full.py

Issue 2909983003: [loader] Make recipe engine support examples/ module subdir (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
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)
OLDNEW
« no previous file with comments | « recipe_modules/time/example.expected/seed_and_step.json ('k') | recipe_modules/time/examples/full.expected/defaults.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698