testing Package

exceptions Module

exception MorseTestingError(value)[source]

Bases: builtins.Exception

General MORSE unittesting Error.

ros Module

testing Module

class MorseTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

generate_builder_script(test_case)[source]
run(result=None)[source]

Overwrite unittest.TestCase::run

Detect KeyBoardInterrupt exception , due to user or a SIGINIT In particular, it can happen if we detect an exception in the Morse execution. In this case, clean up correctly the environnement.

setUp()[source]
setUpEnv()[source]

This method must be overloaded by subclasses to define a simulation environment.

The code must follow the Builder API convention (without the import of the morsebuilder module which is automatically added).

setUpMw()[source]

This method can be overloaded by subclasses to define environment setup, before the launching of the Morse environment pass

startmorse(test_case)[source]

This starts MORSE in a new process, passing the script itself as parameter (to build the scene via the Builder API).

stopmorse()[source]

Cleanly stop MORSE

tearDown()[source]
tearDownMw()[source]

This method can be overloaded by subclasses to clean up environment setup

wait_initialization()[source]

Wait until Morse is initialized

class MorseTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, buffer=False, resultclass=None, warnings=None)[source]

Bases: unittest.runner.TextTestRunner

run(suite)[source]
setup_logging()[source]
follow(file)[source]

Really emulate tail -f

See http://stackoverflow.com/questions/1475950/tail-f-in-python-with-no-time-sleep for a detailled discussion on the subject

Table Of Contents

Previous topic

services Package

Next topic

robots Package

This Page