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

Side by Side Diff: recipes/example/module_self_ref.py

Issue 2628523004: Allow module self-reference in loader (Closed)
Patch Set: typo Created 3 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 unified diff | Download patch
« no previous file with comments | « recipe_engine/loader.py ('k') | recipes/example/module_self_ref.expected/basic.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2017 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file.
4
5 DEPS = [
6 'step',
7 ]
8
9
10 def RunSteps(api):
11 # This tests that a module self-reference via .m works. Below example looks
12 # rather artificial, but it can be useful in more complex usage, where api
13 # is passed around.
14 #
15 # It's also a regression test for the following error which would otherwise
16 # appear here:
17 #
18 # ModuleInjectionError: Recipe Module 'step' has no dependency 'step'.
19 api.step.m.step('foo', ['true'])
20
21
22 def GenTests(api):
23 yield api.test('basic')
OLDNEW
« no previous file with comments | « recipe_engine/loader.py ('k') | recipes/example/module_self_ref.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698