Generated using http://github.com/rbuckton/grammarkdown
SourceCharacter ::
any Unicode code point
InputElementDiv ::
WhiteSpace
LineTerminator
Comment
Generated using http://github.com/rbuckton/grammarkdown
SourceCharacter ::
any Unicode code point
InputElementDiv ::
WhiteSpace
LineTerminator
Comment
| def pytest_addoption(parser): | |
| parser.addoption("--flag", action="store_true", help="just a flag") | |
| parser.addoption("--fileargument", action="store", default="bar", help="expecting config.json") |
| import abc | |
| import copy | |
| class ClassDef(object): | |
| ClassMap = {} | |
| def __init__(self, name, parent_class_name): | |
| self.name = name | |
| self.parent_class_name = parent_class_name |
Sometimes it is useful to control order of execution of HTTP requests (to execute a request only if last request didn't fail, to attach data from last request to current, etc). Currently, Taurus script language allows only sequential execution of requests with no flow control abilities.
This proposal describes possible design of adding flow control to Taurus by adding "logic blocks" to scenario.requests.
By flow control this proposal understands:
| module StackMachine where | |
| type Value = Double | |
| data Instruction = IPush Value | IAdd | ISubtract | IMultiply | IDivide | |
| deriving (Show) | |
| data Expr = Lit Value | |
| | Add Expr Expr | |
| | Subtract Expr Expr |
| import piggyphoto | |
| import pygame | |
| def quit_pressed(): | |
| for event in pygame.event.get(): | |
| if event.type == pygame.QUIT: | |
| return True | |
| return False | |
| def show(file): |
| """ | |
| Simple engine for maching regular languages. | |
| Proof of concept that regexps can be built on top of Python generators. | |
| """ | |
| def literal(c): # regexp 'a' | |
| assert len(c) < 2 | |
| def matcher(input): | |
| if input.startswith(c): | |
| yield input[len(c):] |