Skip to content

basic_bot.test_helpers.start_stop

start_service

def start_service(service_name: str,
                  run_cmd: str,
                  env: Dict[str, str] = {}) -> None

Starts requested service using bb_start command. This is useful for integration and e2e tests.

BB_ENV=test is forced to ensure that the services are started in the test environment which means motor control, vision camera, and other hardware specific modules are mocked.

Arguments:

service_name = the name of the service. "test_" is prepended to the service name to create pid and and log files that are distinct from the services which may be running for development.

run_cmd = the command to start the service.

stop_service

def stop_service(service_name: str) -> None

stops the requested service using bb_stop command.

Arguments:

  • service_name - the name of the service to stop as it was passed to start_service function above