bugscpp.processor.test.TeardownTestCommandScript

class TeardownTestCommandScript(case: int)[source]

Bases: bugscpp.processor.test.TestCommandScript

Script to execute after running CoverageTestCommandScript.

Clear the coverage data by remove gcov directory and its contents. related to: https://github.com/Suresoft-GLaDOS/defects4cpp/issues/66

__init__(case: int)[source]

Methods

__init__(case)

after()

Invoked after script is executed.

before()

Invoked before script is executed.

output(linenr, exit_code, output)

Invoked after each line is executed.

should_be_run_at_once()

returns

Return true if it should be written to a file and executed at once,

step(linenr, line)

Invoked before each line is executed.

Attributes

captured_output

case

after()

Invoked after script is executed.

before()[source]

Invoked before script is executed.

output(linenr: Optional[int], exit_code: int, output: str)

Invoked after each line is executed. linenr is None if all commands are executed as if it is a script.

Parameters
  • linenr (Optional[int]) – Index of the commands which has been executed. None if the type is CommandType.Script.

  • exit_code (Optional[int]) – Exit code of the executed command. None when stream is set to False.

  • output (str) – Captured stdout of the executed command.

should_be_run_at_once() bool
Returns

Return true if it should be written to a file and executed at once, otherwise if it is sent to a container line by line.

Return type

bool

step(linenr: int, line: str)

Invoked before each line is executed.

Parameters
  • linenr (int) – The current line number.

  • line (str) – The current line to execute.