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

Unified Diff: recipe_modules/python/example.py

Issue 2909983003: [loader] Make recipe engine support examples/ module subdir (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: recipe_modules/python/example.py
diff --git a/recipe_modules/python/example.py b/recipe_modules/python/example.py
deleted file mode 100644
index d816d95265a9d085205db810463354e5c815f729..0000000000000000000000000000000000000000
--- a/recipe_modules/python/example.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2015 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.
-
-"""Launches the repo bundler."""
-
-DEPS = [
- 'path',
- 'python',
- 'raw_io',
- 'step',
-]
-
-
-def RunSteps(api):
- api.python.succeeding_step("success", ["This step is a success"],
- as_log='success')
-
- # Test that a failing step raises StepFailure.
- was_failure = False
- try:
- api.python.failing_step("failure", "This step is a failure :(")
- except api.step.StepFailure:
- was_failure = True
- assert was_failure
-
- # Test that unbufferred actually removes PYTHONUNBUFFERED envvar.
- api.python('run json.tool', '-m', [
- 'json.tool', api.raw_io.input('{"something":[true,true]}'),
- ], unbuffered=False)
-
- api.python.inline('inline', 'print "Hello World!"')
-
- # Test "vpython"-based invocation.
- #
- # The "test.py" script has an inline VirtualEnv spec that is read by default
- # when "vpython" is invoked.
- #
- # The second invocation uses an explicit spec with a different package set to
- # verify that the explicit spec is laoded instead of the inline spec.
- api.python('run vpython.inlinespec', api.resource('test.py'),
- args=['--verify-enum34'], venv=True)
- api.python('run vpython.spec', api.resource('test.py'),
- args=['--verify-six'], venv=api.resource('test.vpython'))
-
-
-def GenTests(api):
- yield api.test('basic')
« no previous file with comments | « recipe_modules/properties/examples/full.expected/lists.json ('k') | recipe_modules/python/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698