| Index: recipes/example/module_self_ref.py
|
| diff --git a/recipes/example/module_self_ref.py b/recipes/example/module_self_ref.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..be95df2be3559403a636933b3b726c22f0d9085e
|
| --- /dev/null
|
| +++ b/recipes/example/module_self_ref.py
|
| @@ -0,0 +1,23 @@
|
| +# Copyright 2017 The LUCI Authors. All rights reserved.
|
| +# Use of this source code is governed under the Apache License, Version 2.0
|
| +# that can be found in the LICENSE file.
|
| +
|
| +DEPS = [
|
| + 'step',
|
| +]
|
| +
|
| +
|
| +def RunSteps(api):
|
| + # This tests that a module self-reference via .m works. Below example looks
|
| + # rather artificial, but it can be useful in more complex usage, where api
|
| + # is passed around.
|
| + #
|
| + # It's also a regression test for the following error which would otherwise
|
| + # appear here:
|
| + #
|
| + # ModuleInjectionError: Recipe Module 'step' has no dependency 'step'.
|
| + api.step.m.step('foo', ['true'])
|
| +
|
| +
|
| +def GenTests(api):
|
| + yield api.test('basic')
|
|
|