wrapyfi.tests package

Subpackages

Submodules

wrapyfi.tests.test_middleware module

class wrapyfi.tests.test_middleware.ZeroMQTestMiddleware(methodName='runTest')[source]

Bases: TestCase

MWARE = 'zeromq'
test_publish_listen()[source]

Test the publish and listen functionality of the middleware. This verifies that the middleware can send and receive messages using the PUB/SUB pattern.

class wrapyfi.tests.test_middleware.ROS2TestMiddleware(methodName='runTest')[source]

Bases: ZeroMQTestMiddleware

Test the ROS 2 wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the ROS 2 wrapper.

MWARE = 'ros2'
class wrapyfi.tests.test_middleware.YarpTestMiddleware(methodName='runTest')[source]

Bases: ZeroMQTestMiddleware

Test the YARP wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the YARP wrapper.

MWARE = 'yarp'
class wrapyfi.tests.test_middleware.ROSTestMiddleware(methodName='runTest')[source]

Bases: ZeroMQTestMiddleware

Test the ROS wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the ROS wrapper.

MWARE = 'ros'

wrapyfi.tests.test_wrapper module

class wrapyfi.tests.test_wrapper.ZeroMQTestWrapper(methodName='runTest')[source]

Bases: TestCase

MWARE = 'zeromq'
test_activate_communication()[source]

Test the activate communication functionality of the middleware. When the activate_communication method is called, the __WRAPYFI_INSTANCES attribute of the decorated function should be updated with the instance of the class that called the method. Destroying the class instance should remove the instance from the list and the the connection should no longer be active. The activate_communication method should also be callable multiple times on the same function.

test_close()[source]

Test the close functionality of the middleware. When the close method is called, the instances should be reordered in the __WRAPYFI_INSTANCES attribute of the decorated function. Destroying the class instance should remove the instance from the list and the index of the connection should change. The close method should also be callable multiple times on different instances of a class.

test_get_communicators()[source]

Test the get communicators functionality of the middleware. When the get_communicators method is called, the method should return a list of all available middleware wrappers.

class wrapyfi.tests.test_wrapper.ROS2TestWrapper(methodName='runTest')[source]

Bases: ZeroMQTestWrapper

Test the ROS 2 wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the ROS 2 wrapper.

MWARE = 'ros2'
class wrapyfi.tests.test_wrapper.YarpTestWrapper(methodName='runTest')[source]

Bases: ZeroMQTestWrapper

Test the YARP wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the YARP wrapper.

MWARE = 'yarp'
class wrapyfi.tests.test_wrapper.ROSTestWrapper(methodName='runTest')[source]

Bases: ZeroMQTestWrapper

Test the ROS wrapper. This test class inherits from the ZeroMQ test class, so all tests from the ZeroMQ test class are also run for the ROS wrapper.

MWARE = 'ros'

Module contents