simulation.utils.drive_test.run module

Summary

Classes:

AutomatedDriveTest

Automated Drive Testing.

Color

Adds color to string for stdout.

Functions:

make_multiline

Reference

make_multiline(string: str, max_width: int)[source]
class Color[source]

Bases: object

Adds color to string for stdout.

success

Adds green to the text

failure

Adds red to the text

ansi() → Callable[[str], str][source]

Returns a callable function to which a string can be parsed. The string will be colored in the color of the ansi color code.

Parameters

color_code – The ansi color code in which the string should be colored. Take a look at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Returns

A callable function colorize to which a string can be parsed

success() → str

Colorizes data with the given color.

Parameters

s – The string which should be colored

Returns

A string in the given color

failure() → str

Colorizes data with the given color.

Parameters

s – The string which should be colored

Returns

A string in the given color

class AutomatedDriveTest(config: str)[source]

Bases: object

Automated Drive Testing.

execute()[source]

Execute tests inside self.pipeline.

show_results()[source]

Print the table of results to stdout.

check()[source]

Check if tests were successful (atleast the ones that should succeed).