| OLD | NEW |
| (Empty) |
| 1 # Copyright 2015 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 """Launches the repo bundler.""" | |
| 6 | |
| 7 DEPS = [ | |
| 8 'path', | |
| 9 'python', | |
| 10 'raw_io', | |
| 11 'step', | |
| 12 ] | |
| 13 | |
| 14 | |
| 15 def RunSteps(api): | |
| 16 api.python.succeeding_step("success", ["This step is a success"], | |
| 17 as_log='success') | |
| 18 | |
| 19 # Test that a failing step raises StepFailure. | |
| 20 was_failure = False | |
| 21 try: | |
| 22 api.python.failing_step("failure", "This step is a failure :(") | |
| 23 except api.step.StepFailure: | |
| 24 was_failure = True | |
| 25 assert was_failure | |
| 26 | |
| 27 # Test that unbufferred actually removes PYTHONUNBUFFERED envvar. | |
| 28 api.python('run json.tool', '-m', [ | |
| 29 'json.tool', api.raw_io.input('{"something":[true,true]}'), | |
| 30 ], unbuffered=False) | |
| 31 | |
| 32 api.python.inline('inline', 'print "Hello World!"') | |
| 33 | |
| 34 # Test "vpython"-based invocation. | |
| 35 # | |
| 36 # The "test.py" script has an inline VirtualEnv spec that is read by default | |
| 37 # when "vpython" is invoked. | |
| 38 # | |
| 39 # The second invocation uses an explicit spec with a different package set to | |
| 40 # verify that the explicit spec is laoded instead of the inline spec. | |
| 41 api.python('run vpython.inlinespec', api.resource('test.py'), | |
| 42 args=['--verify-enum34'], venv=True) | |
| 43 api.python('run vpython.spec', api.resource('test.py'), | |
| 44 args=['--verify-six'], venv=api.resource('test.vpython')) | |
| 45 | |
| 46 | |
| 47 def GenTests(api): | |
| 48 yield api.test('basic') | |
| OLD | NEW |