| Index: recipe_modules/context/examples/full.py
|
| diff --git a/recipe_modules/context/examples/full.py b/recipe_modules/context/examples/full.py
|
| index 4a9c13ff8b3d29e8cca3211f3db6e811879cbd08..1a6232558fbd26d087a37bcaff26b7df5bc24d19 100644
|
| --- a/recipe_modules/context/examples/full.py
|
| +++ b/recipe_modules/context/examples/full.py
|
| @@ -30,6 +30,16 @@ def RunSteps(api):
|
| with api.context(env={"HELLO": "WORLD", "HOME": None}):
|
| api.step('env step', ['bash', '-c', 'echo $HELLO; echo $HOME'])
|
|
|
| + # %-formats are errors (for now). Double-% escape them.
|
| + try:
|
| + with api.context(env={"BAD": "%format"}):
|
| + assert False # pragma: no cover
|
| + except ValueError:
|
| + pass
|
| +
|
| + # this is fine though:
|
| + api.context(env={"FINE": "%%format"})
|
| +
|
| # can increment nest level... note that this is a low level api, prefer
|
| # api.step.nest instead:
|
| # YES:
|
|
|