simulation.utils.drive_test package¶
Submodules¶
simulation.utils.drive_test.drive_test_cmd module¶
Classes:
|
Simple Wrapper of ROSCmd to run drive tests. |
- class DriveTestCmd(*, desc: str, must_succeed: bool = False, environment: Optional[Dict[str, Any]] = None, **ros_args)[source]¶
Bases:
simulation.utils.basics.ros_cmd.ROSCmd
Simple Wrapper of ROSCmd to run drive tests.
Attributes:
If the command has ran successfully.
The directory where the rosbags are stored.
Keep rosbag in every case
Description of the drive.
If the command has to succeed.
Methods:
run
()Prepare and run the command.
- success: bool = False¶
If the command has ran successfully.
- cmd_base: str¶
Command string without any arguments.
- rosbag_path: str = None¶
The directory where the rosbags are stored.
- keep_rosbag: bool = False¶
Keep rosbag in every case
- desc: str = None¶
Description of the drive.
- must_succeed: bool = False¶
If the command has to succeed.
simulation.utils.drive_test.run module¶
Functions:
|
Classes:
|
Adds color to string for stdout. |
|
Automated Drive Testing. |
- class Color[source]¶
Bases:
object
Adds color to string for stdout.
Methods:
ansi
(color_code)Returns a callable function to which a string can be parsed.
success
()Adds green to the text
failure
()Adds red to the text
- static ansi(color_code: int) → 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¶
Adds green to the text
- failure() → str¶
Adds red to the text
- class AutomatedDriveTest(config: str, runner_index: Optional[int], total_runners: Optional[int])[source]¶
Bases:
object
Automated Drive Testing.
Methods:
execute
()Execute tests inside self.pipeline.
Print the table of results to stdout.
check
()Check if tests were successful (atleast the ones that should succeed).