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

Unified Diff: recipe_modules/python/example.py

Issue 2875823002: Add vpython support to Python recipe module. (Closed)
Patch Set: rebase 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
« no previous file with comments | « recipe_modules/python/api.py ('k') | recipe_modules/python/example.expected/basic.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/python/example.py
diff --git a/recipe_modules/python/example.py b/recipe_modules/python/example.py
index 4e35c8a9d9352b9d34211c8400bafb5f05adc4b0..d816d95265a9d085205db810463354e5c815f729 100644
--- a/recipe_modules/python/example.py
+++ b/recipe_modules/python/example.py
@@ -5,6 +5,7 @@
"""Launches the repo bundler."""
DEPS = [
+ 'path',
'python',
'raw_io',
'step',
@@ -30,6 +31,18 @@ def RunSteps(api):
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/python/api.py ('k') | recipe_modules/python/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698