vvt#
- class Directive(name: str, file: str, when: dict[str, str], options: list[tuple[str, Any]], argument: str, line: str, line_no: int)#
Bases:
object- name: str#
- file: str#
- when: dict[str, str]#
- options: list[tuple[str, Any]]#
- argument: str#
- line: str#
- line_no: int#
- class VVTestModel(root: str, path: str | None = None)#
Bases:
PYTModel
- class VVTestLockEmitter#
Bases:
PYTLockEmitter
- class VVTestAdapter(model: VVTestModel)#
Bases:
object
- csplit(text: str) list[Any]#
- class TableToken(line: str, string: str, type: str)#
Bases:
object- line: str#
- string: str#
- type: str#
- NC: ClassVar[str] = '==NC=='#
- NR: ClassVar[str] = '==NR=='#
- WORD: ClassVar[str] = '==WORD=='#
- popnext(arg: list[str]) str#
- tokenize_table_text(table_text: str) Generator[TableToken, None, None]#
Split text into a table. Each row begins with a space and columns within the row are separated by a comma.
a,b,c d,e,f -> [[a, b, c], [d, e, f]]The splitting is complicated by accomodating spaces around the comma:
a , b, c d ,e , f -> [[a, b, c], [d, e, f]]The following will also split properly:
a , "b , 0", c d ,e , f !-> [[a, 'b , 0', c], [d, e, f]]
- make_table(text: str) list[list[str]]#
- p_GEN_PARAMETERIZE(arg: Directive) tuple[list, list, dict, list | None]#
# VVT: parameterize ( OPTIONS,generator ) [:=] script [–options]
- p_PARAMETERIZE(arg: Directive) tuple[list, list, dict, list | None]#
# VVT: parameterize ( OPTIONS ) [:=] names_spec = values_spec
names_spec: name1,name2,… values_spec: val1_1,val2_1,… val1_2,val2_2,… …
- combine_when_exprs(when1: dict[str, str], when2: dict[str, str]) dict[str, str]#
- make_when_expr(options: dict) dict[str, str]#
- find_vvt_lines(arg: Path | str) tuple[list[str], int]#
Find all lines starting with
#VVT: COMMAND, or continuations#VVT::
- p_OPTION(filename: str, tokens: list[TokenInfo]) tuple[str, Any]#
OPTION : NAME [true] | NAME EQUAL VALUE
- p_OPTIONS(filename: str, tokens: list[TokenInfo]) list[tuple[str, Any]]#
OPTIONS : OPTION COMMA OPTION …
- importable(module_name: str) bool#
- safe_eval(expression: str) Any#
- evaluate_boolean_expression(expression: str) bool | None#
- unique(sequence: list[str]) list[str]#
- to_seconds(arg: str | int | float, round: bool = False, negatives: bool = False) int | float#
- exception ParseError#
Bases:
Exception
- exception VVTParseError(err, arg)#
Bases:
Exception
- exception InvalidTimeFormat(fmt)#
Bases:
Exception