morse.testing package¶
Submodules¶
morse.testing.exceptions module¶
morse.testing.ros module¶
morse.testing.testing module¶
- class MorseBuilderFailureTestCase(methodName='runTest')[source]¶
Bases:
MorseTestCase
This subclass of MorseTestCase can be used to test MORSE handles properly ill-constructed Builder scripts.
It will fail if the Blender Game Engine get started.
- class MorseMoveTestCase(methodName='runTest')[source]¶
Bases:
MorseTestCase
This subclass of MorseTestCase can be used to check for moving actuator, basically by testing a complete pose
- This class assumes lot of stuff to work properly:
the tested robot is called ‘robot’
the pose sensor is called ‘robot.pose’
- if assertAlmostEqualPositionThenFix, it assumes there is a
a ‘robot.motion’ actuator (basically what we test)
a ‘robot.teleport’ actuator (to move to a specific situation)
- class MorseTestCase(methodName='runTest')[source]¶
Bases:
TestCase
- 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.
- abstract 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
- class MorseTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, buffer=False, resultclass=None, warnings=None, *, tb_locals=False)[source]¶
Bases:
TextTestRunner
- 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